Skip to content
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

How can I know whether a user cancels payment? #538

Closed
ko-devHong opened this issue Jun 19, 2019 · 3 comments
Closed

How can I know whether a user cancels payment? #538

ko-devHong opened this issue Jun 19, 2019 · 3 comments
Labels
❓ question Further information is requested

Comments

@ko-devHong
Copy link

Version of react-native-iap

"react-native-iap": "^2.5.3",

Version of react-native

"react-native": "https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz",

Tested environment (Emulator? Real Device?)

Real Device

Steps to reproduce the behavior

It is understood that users can cancel payment within 72 hours if they make payment through the app. Therefore, when canceling the payment, you must reclaim the points that you gave the user. Can you tell me how the user canceled the payment?

@hyochan hyochan added the ❓ question Further information is requested label Jun 19, 2019
@hyochan
Copy link
Member

hyochan commented Jun 19, 2019

You can cancel the subscription and receive the result. If user cancelled the subscription in somewhere else, you can check this via getAvailablePurchases.

@ko-devHong
Copy link
Author

구독을 취소하고 결과를받을 수 있습니다. 사용자가 다른 곳에서 구독을 취소 한 경우이를 통해 확인할 수 있습니다 getAvailablePurchases.

#531 (comment)

As you can see from this link, I've already used this function, but I've returned an empty array.

@Speedy1991
Copy link

Care: If you are using a backend - make sure you validate the purchases in your backend - never trust user input
E.g. For playstore you can do this as described in the docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❓ question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants