Cannot complete transaction using PayPal Javascript Standard Integration Example

meechponv
New Community Member

I am following this example for PayPal

 

github.com/paypal-examples/docs-examples/tree/main/standard-integration

 

I created a paypal business account and copied the Client ID and Secret into .env file and into index.html file to replace test in string, and changed the $100 value to $1 value in paypal-api.js

 

When I load it with npm install and npm start from VS Code, I get the paypal page

 

 

When I try to enter the SandBox credentials it gives me an error you are trying to log in with seller credentials. I don't understand what I am supposed to use these for if I can't log in with them

 

Next, when I try to enter the CC details without logging in, it says transaction completed. But I do not see any funds in my paypal account not any funds taken from my CC

 

What am I doing wrong? Why is this integration not working?

 

Thanks

Login to Me Too
1 REPLY 1

MTS_Chiranjeevi
Moderator
Moderator

Good day @meechponv,

 

Thank you for posting to the PayPal community.

 

Merchant can't perform self payments, If your testing the flow in Sandbox environment please create a test personal sandbox account and complete the payment.

 

https://developer.paypal.com/tools/sandbox/accounts/#link-createandmanagesandboxaccounts 

 

If you have processed test payment via guest checkout(without PayPal account) successfully, please login to your business Sandbox account(through which you have created Client ID and Secret) to access the payment details.

 

Note : If your trying to perform LIVE payments, please process the payment via valid card which is not linked to your PayPal Business account or from a different LIVE PayPal account.

 

Sincerely,

Chiranjeevi

PayPal/Braintree MTS

 

If this post or any other was helpful, please enrich the community by giving kudos or accepting it as a solution.

 

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.