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

using subscription in paypal is always giving status as EXPIRED #98

Open
bipindubey-technoark opened this issue Mar 20, 2021 · 3 comments

Comments

@bipindubey-technoark
Copy link

I am implementing subscription based payment in reactjs project and i have created product and plan id and below is my code

<PayPalButton
				options={{
					vault: true,
					clientId: 'MYCLIENTID'
				}}
				createSubscription={(data, actions) => {
					return actions.subscription.create({
						plan_id: 'P-XXXXXXXXXXXXXXXXXXX',
					});
				}}
				onApprove={(data, actions) => {
					// Capture the funds from the transaction
					return actions.subscription.get().then(function (details) {
						// Show a success message to your buyer
						console.log('data', JSON.stringify(data));
						console.log('details', JSON.stringify(details));
						alert('Subscription completed');
						onSuccess(data, details);
					});
				}}
				onError={(error) => {
					console.log('1', error);
				}}
				catchError={(error) => {
					console.log('2', error);
				}}
			/>
		I have replaced client id and plan id with mine .. and payment is also working but it is giving the status as EXPIRED...
		What could be the issue here?? Please help me 
		
		Thanks
@Anchalparas
Copy link

@bipindubey-technoark did you find the solution to the above. I am getting the same issue

@bipindubey-technoark
Copy link
Author

@Anchalparas not yet

@bipindubey-technoark
Copy link
Author

@Anchalparas for now i am sending COMPLETED as status in BE database for test purpose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants