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

Initialize RevenueCat STORE for both iOS & Android in a single Screen #852

Open
anisurrahman072 opened this issue Jan 19, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@anisurrahman072
Copy link

Suggesting a way to --> Initialize RevenueCat STORE for both iOS & Android in a single Screen

If you are controlling both Android and iOS paywall screen from a single screen, then initialize RevenueCat STORE like below just before calling product purchase API instead of calling the initialize SDK inside useEffect().

image

It was not very clear in the documentation that how it could be done very fast.

@anisurrahman072 anisurrahman072 added the bug Something isn't working label Jan 19, 2024
@RCGitBot
Copy link
Contributor

👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!

@mangal-brovitech
Copy link

mangal-brovitech commented Jan 23, 2024

and how to handle slow test card , Approves after some time case as it goes in the error block

const productToBuy = {
       identifier: selectedPlan.identifier,
       description: selectedPlan.description,
       title: selectedPlan.title,
       price: selectedPlan.price,
       priceString: selectedPlan.priceString,
       currencyCode: selectedPlan.currencyCode,
       introPrice: selectedPlan.introPrice,
       discounts: selectedPlan.discounts,
       productCategory: selectedPlan.productCategory,
       subscriptionPeriod: selectedPlan.subscriptionPeriod,
       defaultOption: selectedPlan.defaultOption || null,
       subscriptionOptions: selectedPlan.subscriptionOptions || null,
       presentedOfferingIdentifier: selectedPlan.presentedOfferingIdentifier || null,
     };
     const { customerInfo, productIdentifier } = await Purchases.purchaseStoreProduct(
       productToBuy
     );
   ****Goes in the error block and gives if slow test card [Error: Payment is Pending]****
     Alert.alert('Success', 'Plan Purchased successfully');
     navigation.goBack();
```}

@michaelAtRC
Copy link

Hey @anisurrahman072 !

Thanks for the feedback, I have noted this and we will work on updating the documentation to make this clearer.

@mangal-brovitech
Copy link

@michaelAtRC can you help me if you how to handle slow test card scenario for google console sandbox environment ?

@michaelAtRC
Copy link

Hey @mangal-brovitech ,

That is usually a case of the sandbox user having a long history of purchases. I recommend testing with a fresh sandbox user and testing this function again.

Let me know if that helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants