question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

buyProduct() second time when the first time error

See original GitHub issue

Version of react-native-iap

“react”: “16.4.1”, “react-native”: “0.56.0”, “react-native-iap”: “^1.4.0”,

Platforms you faced the error (IOS or Android or both?)

iOS only

Expected behavior

I want to start a new purchase, not recover, whatever success or failure before. what should I do?

Actual behavior

in fact, IAP shows: You have purchased this in-app purchase. This project will be free to recover.

Tested environment (Emulator? Real Device?)

Real Device in sandbox purchase

Steps to reproduce the behavior

first time :

RNIap. buyProductWithoutFinishTransaction(sku).then(receipt => {
// some error code in callback,so the process did not continued.
// but it seemed like APPLE IAP server record this purchase.
})

I found I used wrong api , cause I didn’t understand the api instructions. so i changed the code.

second time:

RNIap.buyProduct(sku).then(receipt => {
// it shows 
// You have purchased this in-app purchase.
// This project will be free to recover.
})

image

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
12343954commented, Aug 19, 2018

@dooboolab very good man!

0reactions
hyochancommented, Sep 14, 2018

#257 #259 Closing it for dupe issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Buying the same product twice will give an error #131 - GitHub
First time I buy a product_A on a "new" device - it works. ... will not work. The error message is: "An unknown...
Read more >
Xcode 12 iOS 14 error purchase | Apple Developer Forums
I tested it just now, first few purchases failed and then they start working, after some time they stop working again. It is...
Read more >
SKProduct returns nil the first time, works later - Stack Overflow
Upon requesting an IAP (getPurchaseInfo() —> request.start()) the first time I click on it, it gives me an error with no products found....
Read more >
RFC 1305: Network Time Protocol (Version 3) Specification ...
In particular, the sources of time and frequency errors have been rigorously ... The clock-selection procedure was modified to remove the first of...
Read more >
add_custom_command — CMake 3.25.1 Documentation
The first signature is for adding a custom command to produce an output: ... Specify the command-line(s) to execute at build time. If...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found