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

finishTransactionIOS/finishTransaction this is not working in IOS #1019

Closed
Mitdd9707 opened this issue May 27, 2020 · 7 comments
Closed

finishTransactionIOS/finishTransaction this is not working in IOS #1019

Mitdd9707 opened this issue May 27, 2020 · 7 comments
Labels
🙏 help wanted Extra attention is needed 📱 iOS Related to iOS

Comments

@Mitdd9707
Copy link

Version of react-native-iap

4.4.8

Version of react-native

0.61.5

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

IOS

Expected behavior

I click in the purchase button and I getting the error is undefined finishTransactionIOS method give me an error (undefined/null).
I send finishtransaction this Purchase Object
I send finishTransactionIOS this purchase.transactionId
all ready send but response was (undefined/null).
Screenshot 2020-05-27 at 6 32 23 PM

Actual behavior

Tested environment (Emulator? Real Device?)

Real Device (I am Using IphoneX)

Steps to reproduce the behavior

@hyochan Can you please help me?

@anastely
Copy link
Contributor

Can you share your code snippet?
I guess I've faced something like this, and want to be sure if it related or not on my issue #1020

@tomerdev
Copy link

It looks like you didn't use a promise?
You should use await when calling finishTransaction

@hyochan
Copy link
Member

hyochan commented Jun 18, 2020

@Mitdd9707 Can this be closed? I think you should share some of your code.

@bcbcbcbcbcl
Copy link

I am having the same issue, this is the code I used.

      purchaseUpdateSubscription = RNIap.purchaseUpdatedListener(
        async (purchase) => {
          console.log(purchase);
          const receipt = purchase.transactionReceipt;
          if (receipt) {
            try {
              const ackResult = await RNIap.finishTransaction(purchase);
              console.log('ackResult', ackResult);
            } catch (ackErr) {
              console.warn('ackErr', ackErr);
            }
  
            Alert.alert('purchase error', JSON.stringify(receipt));
          }
        },
      );

@n0umankhan
Copy link

  • i'm having the same issue

@jkz27
Copy link

jkz27 commented Oct 19, 2020

Do we have an update on this???

@hyochan
Copy link
Member

hyochan commented Oct 26, 2020

Closes via #1160

@hyochan hyochan closed this as completed Oct 26, 2020
@hyochan hyochan added 🙏 help wanted Extra attention is needed 📱 iOS Related to iOS labels Oct 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙏 help wanted Extra attention is needed 📱 iOS Related to iOS
Projects
None yet
Development

No branches or pull requests

7 participants