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

[IOS] Can't recognize the purchase after Registering a card because of non-registered card #394

Closed
yansfil opened this issue Feb 7, 2019 · 3 comments
Labels
👣 waiting for response Need feedback to continue

Comments

@yansfil
Copy link

yansfil commented Feb 7, 2019

kakaotalk_photo_2019-02-07-11-34-56

Our clients who couldn't get coins after purchase increases.
because Clients didn't register card or write wrong informations, IAP let them go to ios-play-store and force to input new card infos. After that, Purchase was successful(money came out) on ios-playstore. And return to our application, it didn't recognize that. As you can see Above the picture, client try again to purchase.. but it can't

try {
                const {sendIapReceipt} = this.props
                const purchase = await RNIap.buyProduct(item.iapItemName)
                const receipt = purchase.transactionReceipt
                if (receipt) {
                    sendIapReceipt({receipt}).then(result => {
                        Toast.show('결제가 완료되었습니다.', Toast.SHORT)
                    }).catch(err => {
                        alert('결제 오류가 발생했습니다. 고객센터에 연락해주세요.')
                    })
                }
            } catch (e) {
                Toast.show(e.toString(), Toast.SHORT)
                const subscription = RNIap.addAdditionalSuccessPurchaseListenerIOS(async (purchase) => {
                    const receipt = purchase.transactionReceipt
                    const {sendIapReceipt} = this.props
                    if (receipt) {
                        sendIapReceipt({receipt}).then(result => {
                            Toast.show('결제가 완료되었습니다.', Toast.SHORT)
                        }).catch(err => {
                            alert('결제 오류가 발생했습니다. 고객센터에 연락해주세요.')
                        })
                    }
                    subscription.remove();
                });
            }
@yansfil yansfil changed the title [IOS] Can't recognize the purchase After Registering a card because of non-registered card [IOS] Can't recognize the purchase after Registering a card because of non-registered card Feb 7, 2019
@hyochan
Copy link
Member

hyochan commented Feb 7, 2019

Yeah, this was one of the critical issues we've faced in #307 and I've supported this in #348. You can go over the readme and see how to add this feature.

Also, I hope your company(if it is a company that uses this module) could participate as a backers of our module because this becomes quite large to be handled by just me. I am spending quite a few times maintaining this but I am still seeing quite many issues not covered yet that needs some dev's participation. I'm planning to participate in issue hunter if some backers support this.

P.S. As a billing library update, it is just a burden for me to handle just migration to cover an issue like #391. Hope there is some help out there to maintain this.

@hyochan
Copy link
Member

hyochan commented Feb 7, 2019

I just looked into this again, and I think you are facing a different problem. Are you really sure that you are not getting the value out of addAdditionalSuccessPurchaseListenerIOS? I think you want the customers to actually rebuy the item. Looks like the products should be consumable but I think it is currently non-consumable.

@hyochan hyochan added the 👣 waiting for response Need feedback to continue label Feb 7, 2019
@hyochan
Copy link
Member

hyochan commented Feb 21, 2019

Closed for inactivity.

@hyochan hyochan closed this as completed Feb 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👣 waiting for response Need feedback to continue
Projects
None yet
Development

No branches or pull requests

2 participants