Comments (3)
I was missing developer payload, the structure should look like this:
{
"data": {
"packageName": "",
"productId": "",
"purchaseTime": 0,
"purchaseState": 0,
"developerPayload": "",
"purchaseToken": "",
"autoRenewing": false
},
"signature": ""
}
from ti.inappbilling.
Well, something happened inbetween July 1st and now and subscription validation was failing. I got fed up trying to create the payload manually so I created a PR to get the RAW receipt from the Purchase class. You now just send the following to your backend, which is running validation module such as NPM:in-app-purchase
function purchaseCompleted(e) {
Ti.API.debug('Purchase response: ' + responseString(e.responseCode));
if (e.success && e.purchase) {
alert('Purchase completed successfully');
//Ti.API.log("GOOGLE Response: " + JSON.stringify(e));
//Ti.API.log("GOOGLE Purchase: " + JSON.stringify(e.purchase));
Ti.API.log("GOOGLE Receipt: " + JSON.stringify(e.purchase.getReceipt()
Your receipt will now be the following, which is exactly what you need to send to validate externally:
{
"data": {\"stringified originalPurchaseJSON here"\},
"signature": "string_signature_here"
}
from ti.inappbilling.
Here's the PR
#23
from ti.inappbilling.
Related Issues (20)
- "queryinventorycomplete" does not return the available products HOT 1
- BILLING_RESPONSE_RESULT_SERVICE_UNAVAILABLE HOT 2
- query inventory response IAB RESULT VERIFICATION FAILED HOT 4
- Fails on Nexus 5 with Android 6.0 HOT 24
- While Performing Purchase Request on Nexus 5 i get this Error - any idea? HOT 4
- In-app Billing Vulnerability HOT 18
- Restore Purchases (queryInventory) Failing with 20+ Purchases: responseCode 5 (FIXED - Need Help Committing Fix). HOT 1
- Product Locale prices
- App crash in startup HOT 5
- Detect closing the purchase dialog
- inventory.getDetails doesn't seem to work so I can read price. HOT 1
- Appceleretator sdk 7.0.1 support? HOT 4
- java.lang.ClassNotFoundException: android.support.v7.app.AppCompatViewInflater HOT 1
- Not working HOT 26
- java.lang.IllegalStateException: Setup already completed. HOT 2
- Verification failed error after purchase
- Not supported on SDK 8 HOT 14
- UnsatisfiedLinkError HOT 8
- Failing on Newer Samsung Devices (S5, S6, Note Edge) HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ti.inappbilling.