Question

Thank you for taking the time to look at my question.

I'm using django on an ubuntu box.

I developed an 'upgrade account' feature for a client. The user clicks a button which then sends an api request to cancel their current subscription and redirects the user to amazon to create a new one.

It worked perfectly in sandbox.

In the first couple of weeks after deployment I've gotten a few errors from the cancel method: invalid subscription id. I checked the subscription id that was reported as invalid and it matches exactly to the subscription id on the client's amazon payment interface.

Does anyone have any idea why this would happen?

Below is the error message I received:

Error Message:
FPS Response Error: 400 ResponseError
Undefined response error.
Subscription Id xxxxxxxxxx is invalid. 

This has never been successful in production.

I've also posted this question in the aws forum, with no response.

Please help!!

Was it helpful?

Solution

Just in case anyone comes up with the same question: The boto app uses the fps sandbox as the default endpoint. I needed to change this in order for it to work.

Like so:

kwargs = {'host' : simplepay.FPS_HOST}
fps_conn = FPSConnection(simplepay.ACCESS_KEY, 
                simplepay.SECRET_KEY, **kwargs)

Where FPS_HOST,ACCESS_KEY AND SECRET_KEY are defined in my apps' init.py and determined by whether debug is true or not.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top