-
-
Notifications
You must be signed in to change notification settings - Fork 641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to get product from testflight IOS #2797
Comments
Ensure your Tax Information and Banking information are filled out. You can find these agreements in App Store Connect > Business > {Select Own Business}. Make sure you have the Agreements, Bank Accounts, and Tax Forms filled out correctly. Hope this helps. |
Hello Alexandre,
I done "Ensure your Tax Information and Banking information are filled
out." and I am getting products and do purchase but getting malformed
receipt and status code { "status": 21002} I also test it from testflight
but got same result can you please help me , I also used setup({
storekitMode: 'STOREKIT2_MODE' });
const validateReceipt = async (receipt, purchase) => {
const requestBody = {
'receipt-data': receipt,
'password': '31ca*************************' // if applicable
};
console.log('requestBody is valid:', requestBody);
const validateReceiptIos = await IAP.validateReceiptIos(requestBody, true)
console.log("validateReceiptIos==>", receipt, validateReceiptIos)
alert(JSON.stringify(validateReceiptIos))
try {
const response = await fetch('https://sandbox.itunes.apple.com/verifyReceipt
', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(requestBody)
});
console.log('response is valid:', response);
const jsonResponse = await response.json();
alert("response" + JSON.stringify(jsonResponse))
if (jsonResponse.status === 0) {
// Valid receipt
console.log('Receipt is valid:', jsonResponse);
} else {
// Invalid receipt
console.info('Invalid receipt:', jsonResponse);
}
setTimeout(async () => {
const finishTransaction = await IAP.finishTransaction({ purchase,
isConsumable: true });
}
}, 2000);
} catch (error) {
console.error('Error validating receipt:', error);
}
};
…On Tue, Jul 9, 2024 at 7:03 AM Alexandre Palagem ***@***.***> wrote:
Ensure your Tax Information and Banking information are filled out.
Once I agreed to the terms and added banking info, everything started
working fine.
You can find these agreements in App Store Connect > Business > {Select
Own Business}. Make sure you have the Agreements, Bank Accounts, and Tax
Forms filled out correctly. Hope this helps.
—
Reply to this email directly, view it on GitHub
<#2797 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BCCY76CUB2L44T22B3EJ56DZLM4XZAVCNFSM6AAAAABKQGCYSSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJWGA3TCNRXGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Hello Team,
I am facing an issue with consumable product purchases. When a user
purchases an item and kills the app before receiving a response, the
payment is completed, but the data is not retrieved from the available
purchases and purchase history.
Case: When a user clicks on the "Buy Item" button with UPI, it opens the
UPI app. After entering the UPI PIN, the payment is successful, and I
immediately close both the payment app and my app. After some time, I
reopen the app and do not get the purchase info from the purchase history
and available purchases. When I attempt the payment again, I receive a
popup saying, "You already own this item."
How can I resolve this programmatically?
I hope for a quick response.
Best regards,
On Thu, Jul 11, 2024 at 4:09 PM Rohit Jaat ***@***.***>
wrote:
… Hello Alexandre,
I done "Ensure your Tax Information and Banking information are filled
out." and I am getting products and do purchase but getting malformed
receipt and status code { "status": 21002} I also test it from testflight
but got same result can you please help me , I also used setup({
storekitMode: 'STOREKIT2_MODE' });
const validateReceipt = async (receipt, purchase) => {
const requestBody = {
'receipt-data': receipt,
'password': '31ca*************************' // if applicable
};
console.log('requestBody is valid:', requestBody);
const validateReceiptIos = await IAP.validateReceiptIos(requestBody, true)
console.log("validateReceiptIos==>", receipt, validateReceiptIos)
alert(JSON.stringify(validateReceiptIos))
try {
const response = await fetch('
https://sandbox.itunes.apple.com/verifyReceipt', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(requestBody)
});
console.log('response is valid:', response);
const jsonResponse = await response.json();
alert("response" + JSON.stringify(jsonResponse))
if (jsonResponse.status === 0) {
// Valid receipt
console.log('Receipt is valid:', jsonResponse);
} else {
// Invalid receipt
console.info('Invalid receipt:', jsonResponse);
}
setTimeout(async () => {
const finishTransaction = await IAP.finishTransaction({ purchase,
isConsumable: true });
}
}, 2000);
} catch (error) {
console.error('Error validating receipt:', error);
}
};
On Tue, Jul 9, 2024 at 7:03 AM Alexandre Palagem ***@***.***>
wrote:
> Ensure your Tax Information and Banking information are filled out.
> Once I agreed to the terms and added banking info, everything started
> working fine.
>
> You can find these agreements in App Store Connect > Business > {Select
> Own Business}. Make sure you have the Agreements, Bank Accounts, and Tax
> Forms filled out correctly. Hope this helps.
>
> —
> Reply to this email directly, view it on GitHub
> <#2797 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/BCCY76CUB2L44T22B3EJ56DZLM4XZAVCNFSM6AAAAABKQGCYSSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJWGA3TCNRXGE>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
Hello Team,
I am facing an issue with consumable product purchases. When a user
purchases an item and kills the app before receiving a response, the
payment is completed, but the data is not retrieved from the available
purchases and purchase history.
Case: When a user clicks on the "Buy Item" button with UPI, it opens the
UPI app. After entering the UPI PIN, the payment is successful, and I
immediately close both the payment app and my app. After some time, I
reopen the app and do not get the purchase info from the purchase history
and available purchases. When I attempt the payment again, I receive a
popup saying, "You already own this item."
How can I resolve this programmatically?
I hope for a quick response.
Best regards,
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello Team,
I need some help in IAP, I have setup IAP in react native for IOS and working fine with xcode locally but when I want to validate receipt it gives me 21002 from real device. Now I want test it from Testflight but unable to get products, I am using storeKit file. I have run IAP locally and getting product through getProduct method but when I upload it to Testflight it gives me empty array.
My react native 0.70.3
and IAP(react-native-iap) 12.15.1
I have done below things
May I know if anything else required for IAP for IOS in react native
please help me for this to complete my IAP with validate receipt
Thank You in advance :)
I hope someone reply quickly
The text was updated successfully, but these errors were encountered: