I am trying to use Payments Standard and having trouble...

silver2row
New Community Member

Hello,

 

So far, I have been unable to use PayPal Payments Standard after watching videos, testing on my personal site online, and by reading the short tutorials on the web at https://developer.paypal.com/docs/checkout/standard/integrate/ and by visiting the Code Spaces. 

 

I am able to install the npm and needed third party libraries/modules.

 

I typed up the data for the /client/app.js and /client/checkout.html files. I also used /server/server.js for another file to test. With my site, I can achieve the paypal.com buttons but not the authority to checkout for testing purposes. 

 

Also, I am testing from this github repo online: https://github.com/paypal-examples/docs-examples/tree/main/standard-integration 

 

Please see the below photo for this idea:

 

 

PayPal_.png

 

I listened to the options in building the appliance online but have not used npm recently and am currently lacking in that dept. Anyway, if you can help, please send guidance...

 

Again...

 

My file for promoting the paypal Payments Standard are these listed below:

 

/var/www/Site/client/app.js

/var/www/Site/client/checkout.html

/var/www/Site/server/server.js

/var/www/Site/my_online_page.html

 

I know I should probably put in the credentials in /my_online_page.html instead of using checkout.html but I am just not sure as of now...

 

Seth

Login to Me Too
2 REPLIES 2

silver2row
New Community Member

 

 

This is the error with:

 

npm start

 

npm ERR! code EJSONPARSE
npm ERR! path /var/www/Site/package.json
npm ERR! JSON.parse Unexpected token "}" (0x7D) in JSON at position 182 while parsing near "...erver/server.js\",\n  },\n\n {\n  \"dependenci..."
npm ERR! JSON.parse Failed to parse JSON data.
npm ERR! JSON.parse Note: package.json must be actual JSON, not just JavaScript.

npm ERR! A complete log of this run can be found in:
Login to Me Too

Kavyar
Moderator
Moderator

Good day @silver2row 

 

Thank you for posting to the PayPal community.

 

Based on the error message you provided, it seems that there is an issue with your package.json file. The error suggests that there is an unexpected token "}" at position 182 in the JSON.

 

To resolve this issue, please ensure that your package.json file has a valid JSON. Make sure that all the JSON syntax is correct, including the opening and closing braces, commas, and quotes.

 

I would suggest to please contact your website developer or the support of the third-party platform (eCommerce) to cross check the integration code.

 

If you are still experiencing issues, please create an MTS ticket via the following URL - https://www.paypal-support.com/s/?language=en_US . Please ensure that you provide detailed information and error details when submitting the ticket.

 

Sincerely,

Kavya

PayPal 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.