-
Notifications
You must be signed in to change notification settings - Fork 68
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
Can't process subscription - angular 16: Uncaught Error: Must pass createSubscription with intent=subscription #242
Comments
Has anyone found a solution for this? Is it working for you @startupcode ? Thanks |
I found that ngx-paypal does not support Example:
Where |
Actually I found the other way round to implement this. My issue was when I was implementing intent Subscription and Capture both on same page. So I have to implement this on separate page and made plan selection on other page. So based on plan selected I call subscription or capture functions. Above code was correct and it worked. To conclude, subscription and capture both not allowed on same page. |
Thanks for your reply @startupcode . Which version of the library are you using? With latest It'll be great if you can let me know if subscriptions are currently working for you with |
Yes subscripotion working for me with above code using |
Thanks @startupcode . Which Angular version are you using? When I check the code, |
Hi, I'm using Angular CLI: 16.1.6 Angular: 16.1.7 Package Version@angular-devkit/architect 0.1601.6
import { ICreateSubscriptionRequest, IPayPalConfig, ICreateOrderRequest } from 'ngx-paypal'; this.payPalConfig = { I have passed intent in Hope this helps. |
Thanks .. you can see this code is very different from the original post. You are using |
I have tried using the above code for creating a subscription. The transaction is approved but in onClientAuthorization I get an error because actions.order is undefined, and the library tries to read actions.order.capture(). Does anyone know how to fix this issue? |
Uncaught Error: Must pass createSubscription with intent=subscription
Hi can you please share how to use createSubscription. I'm using ngx-paypal 11.0.0 version and failed to implement subscription.
My code is like. tried every combination but not working. Please help need to make the website live.
this.payPalConfig = {
clientId: this.globalVar.PAYPAL_CLIENT_ID,
createSubscription: data => {
plan_id: _this.planID,
custom_id: _this.userdata.id,
intent: 'subscription'
},
intent: 'subscription',
style: {
shape: 'rect',
color: 'gold',
layout: 'vertical',
label: 'paypal',
},
vault: 'true',
advanced: {
intent: 'subscription', vault: 'true'
},
};
}
The text was updated successfully, but these errors were encountered: