iOS in-app purchase failure when payment method added live when there is not payment method already present
See original GitHub issueVersion of react-native-iap
react-native-iap": "^2.3.17
Platforms you faced the error (IOS or Android or both?)
iOS
Expected behavior
Payment should go through only when finishTransaction
is being called
Actual behavior
The amount is being detected after a payment method like credit card is added.
But the RNIap.buyProductWithoutFinishTransaction(sku)
method reached.
Tested environment (Emulator? Real Device?)
Real Device - iPhone 6s
Steps to reproduce the behavior
- Check to ensure the Apple account in the device the payments method is set to none or some invalid payment details
- Make the in-app purchase through the app
- User is taken to the Account settings page to add a valid payment method
- Payment method is charged but the transaction receipt is not received in the below mentioned code
ComponentDidMount(){
await RNIap.initConnection();
await RNIap.consumeAllItems();
const prod = await RNIap.getProducts(product);
}
async componentWillUnmount() {
RNIap.endConnection()
}
buyProduct(sku){
await RNIap.clearTransaction();
RNIap.buyProductWithoutFinishTransaction(sku)
.then(purchase => {
// not reached
if(calltoserverisSuccess){
RNIap.finishTransaction();
}
})
.catch(error => {
// code enters catch case if ever
}}
Issue Analytics
- State:
- Created 5 years ago
- Comments:27 (21 by maintainers)
Top Results From Across the Web
iOS in-app purchase failure when p… | Apple Developer Forums
iOS in-app purchase failure when payment method added live when there is not payment method already present.
Read more >Fix - Apple iPhone Says Your Payment Method was Declined ...
Apple keeps saying my payment method was Declined in iOS 13, why my Apple ID Payment Method was Declined in iOS 15, how...
Read more >Use a family payment method on Google Play
Family members can use the family payment method to make purchases on Google Play or in-app purchases through Google Play's billing system.
Read more >Integrate the Google Play Billing Library into your app
Life of a purchase · Show the user what they can buy. · Launch the purchase flow for the user to accept the...
Read more >In-App Purchasing Overview - Amazon Developer
The IAP API handles details about purchase flow, payment processing, providing a receipt to your app, and managing rights to the purchasable content,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think we need to contact
apple
for this and this looks really terrible that there is a different test case which is not reproducible insandbox
environment. For those who want to understand the problem, I’ve recorded the screen and you can see the clip here. @anandwahed Could you also contact apple for this? Because I know they aren’t that supportive so it is better for more people to have contact with them. Let’s gather up to solve this issue.@JJMoon