Reputation: 876
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.
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"]
Upvotes: 0
Views: 437
Reputation: 12341
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:
currencyCode
in a subscription request
initialPayment
object is missing required fields:
price
currencyCode
Hth....
Upvotes: 1