0
votes

I got my subscriptions all working in the sandbox about 5 days ago, but a day after I finished testing it I started getting 500 server errors every time I try to test my subscriptions in sandbox and in production. I have not changed the code what so ever and my JWTs still decode perfectly.

google wallet error

Any ideas why this is happening? I've contacted Google many times but most of the people I get a hold of clearly have no idea what they are talking about... Has anyone ever run into this issue before? Any input is appreciated!

The failing red line is the google sandbox code:

<script src="https://sandbox.google.com/checkout/inapp/lib/buy.js"></script>

POST:

[,"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiIxMTQ4MTc0NTgxNTIzNzcxMTY5OSIsImF1ZCI6Ikdvb2dsZSIsInR5cCI6Imdvb2dsZVwvcGF5bWVudHNcL2luYXBwXC9zdWJzY3JpcHRpb25cL3YxIiwiZXhwIjoxNDAyMjQ3NTMyLCJpYXQiOjE0MDIyNDM5MzIsInJlcXVlc3QiOnsibmFtZSI6IkF1dG9tYXRvbiBTY2hlZHVsZXIgU3Vic2NyaXB0aW9uIChQUk8pIiwiZGVzY3JpcHRpb24iOiJNb250aGx5IHN1YnNjcmlwdGlvbiB3aXRoIHVwIHRvIDUwIHVzZXJzLiIsImN1cnJlbmN5Q29kZSI6IlVTRCIsInNlbGxlckRhdGEiOiJ1c2VyX2lkOixzdWJzY3JpcHRpb25faWQ6MiIsImluaXRpYWxQYXltZW50Ijp7InBheW1lbnRUeXBlIjoiZnJlZV90cmlhbCJ9LCJyZWN1cnJlbmNlIjp7InByaWNlIjoiNjAuMDAiLCJjdXJyZW5jeUNvZGUiOiJVU0QiLCJmcmVxdWVuY3kiOiJtb250aGx5In19fQ.sju0xaOf9u3ufxow0XxWF4j-QUY0XgtF0A0d8g1rRiQ",,,1]

Response:

[,,4,"VTTMKJ"]
1
What's the request params and response content in the failing (red) AJAX line? Got a code sample for us? - halfer

1 Answers

1
votes

Based on above, this is the request object in your JWT payload:

"request": {
    "name": "Automaton Scheduler Subscription (PRO)",
    "description": "Monthly subscription with up to 50 users.",
    "currencyCode": "USD",
    "sellerData": "user_id:,subscription_id:2",
    "initialPayment": {
        "paymentType": "free_trial"
    },
    "recurrence": {
        "price": "60.00",
        "currencyCode": "USD",
        "frequency": "monthly"
    }
}

Note the docs regarding the structure and required fields in a subscription request. So:

  • There is no currencyCode in a subscription request
  • The above initialPayment object is missing required fields:
    • price
    • currencyCode

Hth....