react-native-iap
react-native-iap copied to clipboard
requestSubscription withOffer alert message: Unable to Purchase
Description
if not use withOffer, it work.
if used withOffer, the purchase process was unsuccessful.
On TestFlight, When the requestSubscription
is called, the product information will pop up, and the user name and password will also be requested.
Alert message ' Unable to Purchase, Contact the developer for more infomation ' after submit password.
Here's my code:
let productId = 'xxxx';
// https://developer.apple.com/documentation/storekit/in-app_purchase/original_api_for_in-app_purchase/subscriptions_and_offers/generating_a_promotional_offer_signature_on_the_server?language=objc
let withOffer = await http.post('https://xxx/signature-with-offer', { ... });
requestSubscription({
sku: productId,
appAccountToken: 'a-uuid',
withOffer: withOffer
})
Environment:
- react-native-iap: 12.11.0
- react-native: 0.72.6
- Platforms (iOS):
The correct method is to obtain the offerToken
through getSubscriptions
and submit the subscription through the requestSubscription
method.
The correct method is to obtain the
offerToken
throughgetSubscriptions
and submit the subscription through therequestSubscription
method.
offerToken
only exists on android platform, and I'm using ios.
@caoyongfeng0214 @yhostc I'm getting one issue where everything works fine in test flight version when I click on Subscribe button and it calls requestSubscription method of react-native-iap package,
but in release version it is showing like this:
What would be the issue?
@caoyongfeng0214 @yhostc I'm getting one issue where everything works fine in test flight version when I click on Subscribe button and it calls requestSubscription method of react-native-iap package, but in release version it is showing like this:
What would be the issue?
Do you also used withOffer?
No
Issue is resolved I updated the library to 12.10.0 and it's working fine now. Thanks!
The correct method is to obtain the
offerToken
throughgetSubscriptions
and submit the subscription through therequestSubscription
method.
offerToken
only exists on android platform, and I'm using ios.
The correct method is to obtain the
offerToken
throughgetSubscriptions
and submit the subscription through therequestSubscription
method.
offerToken
only exists on android platform, and I'm using ios.
Have you resolved this issue? I also cannot find the offer code from the subscriptions object.
I'm getting the same issue, is there any solution, or is anyone able to get a workaround? @caoyongfeng0214
@itsaliraxa have you tried with 12.10.0 version?
no, I'm using the latest version v12.13.0.
On Fri, Mar 15, 2024 at 9:32 AM premj-ekah @.***> wrote:
@itsaliraxa https://github.com/itsaliraxa have you tried with 12.10.0 version?
— Reply to this email directly, view it on GitHub https://github.com/dooboolab-community/react-native-iap/issues/2628#issuecomment-1998919175, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4XC7STSDPSY77RVOCGDF4TYYJ2WVAVCNFSM6AAAAAA73BUWYSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJYHEYTSMJXGU . You are receiving this because you were mentioned.Message ID: @.***>
@premj-ekah I've tried with v12.10.0, but got the same error. Please see the full details below
React-native: 0.71.11 react-native-iap: 12.10.0,
screenshots
error detail: { "message": "[E_UNKNOWN]: An unknown error occurred", "error": { "code": "E_UNKNOWN", "message": "An unknown error occurred", "userInfo": { "NSLocalizedFailureReason": "The server encountered an error", "AMSURL": "http://localhost:55939/WebObjects/MZBuy.woa/wa/inAppBuy", "AMSStatusCode": 200, "AMSServerErrorCode": 3903, "AMSServerPayload": { "dialog": { "m-allowed": false, "explanation": "Contact the developer for more information.\n\n[Environment: Xcode]", "okButtonString": "OK", "initialCheckboxValue": true, "defaultButton": "ok", "message": "Unable to Purchase" }, "jingleAction": "inAppBuy", "dsid": "17322632127", "failureType": "3903", "jingleDocType": "inAppSuccess", "pings": [], "cancel-purchase-batch": true }, "NSLocalizedDescription": "Server Error" } } } } } } }
Hi @itsaliraxa, seems like something is missing when setting up for in app purchase in app store.
Hi @itsaliraxa, seems like something is missing when setting up for in app purchase in app store.
How I can identify it? because when I am going to subscribe without an offer it works fine but if I use withOffer then getting this error.
How I can identify it? because when I am going to subscribe without an offer it works fine but if I use withOffer then getting this error.
On Sun, Mar 17, 2024 at 8:05 PM premj-ekah @.***> wrote:
Hi @itsaliraxa https://github.com/itsaliraxa, seems like something is missing when setting up for in app purchase in app store.
— Reply to this email directly, view it on GitHub https://github.com/dooboolab-community/react-native-iap/issues/2628#issuecomment-2002501975, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4XC7SR6DJPCJF4USEZHRO3YYWWMVAVCNFSM6AAAAAA73BUWYSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBSGUYDCOJXGU . You are receiving this because you were mentioned.Message ID: @.***>