Post by mbodamer » Thu Mar 04, 2021 3:18 am

Hi,
I was able to enable the Paypal Express Checkout payment extension and I successfully tested it using the sandbox credentials. The problem I have is the sandbox creds are given to me with:

Username
Password
Signature

and this matches what the sandbox creds are needed in the module. But when I switch to live, the module is still asking for the same creds (but the live ones of course) but in Paypal under the live api screen I am given:

Account
Client ID
Secret

NOT

Username
Password
Signature

Can someone please tell me how to configure this for live what am I missing?

Thanks

Newbie

Posts

Joined
Sun Jan 10, 2021 12:04 am

Post by nwnprod@gmail.com » Thu Mar 04, 2021 6:56 am

I'm a noob at this, but I was able to find my credentials by following these steps:

How do I request API Signature or Certificate credentials?
To request API Signature or Certificate credentials for your PayPal account:
Log in to your PayPal Live or Sandbox account.
Go to your Account Settings.
In the "API access" section, click Update.
Under "NVP/SOAP API integration (Classic)," click Manage API credentials.
If you have already generated an API Signature, then View API Signature appears. Click that option to view or remove your existing API Signature.
If you have already generated an API Certificate, then View API Certificate appears. Click that option to view or remove your existing API Certificate.
Note: If you are prompted to verify your PayPal account, then follow the on-screen instructions.
Select one of the following options, then click Agree and Submit.
Request API Signature – Select for API Signature authentication.
Request API Certificate – Select for API Certificate authentication.
PayPal generates your API credentials as follows:
API Signature credentials include an API Username, API Password, and Signature, which does not expire. These values are hidden by default for added security. Click Show/Hide to toggle them on and off. When finished, click Done.
API Certificate credentials include an API Username, API Password, and Certificate, which expires automatically after three years. Click Download Certificate to save the API Certificate to your desktop.


Posts

Joined
Thu Mar 04, 2021 6:53 am

Post by ADD Creative » Thu Mar 04, 2021 6:19 pm

OpenCart version?

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by VladSiy » Wed Apr 28, 2021 6:01 pm

Sorry. Perhaps this thread already has an answer to my question. But the suggested links confused me. And I was unable to solve my problem.

Opencart 3.0.3.2 - PayPal Express Checkout.

I set up a sandbox and everything works fine.
I created an app in Live, got the required API data - but it doesn't work.

Error:
"

Code: Select all

Error: There was an error fetching the PayPal token payment / <@https: //my_site.com/catalog/view/javascript/jquery/jquery-2.1.1.min.js line 2> eval: 22: 21 promise_ZalgoPromise
" ...

As I understand it, there is a problem with the paypal authorization.
If someone knows the reason, please tell me in this thread, point by point, what needs to be done?

I am confused by the lack of confidence: there is a problem with the "PayPal Express Checkout" module, perhaps something has already changed and the code needs to be installed. Or is the problem on the paypal side, I substitute the wrong data, you need some kind of permission, additional activation, etc.?

Thank you.

Newbie

Posts

Joined
Wed Apr 28, 2021 5:58 pm
Location - Ukraine

Post by ADD Creative » Wed Apr 28, 2021 8:41 pm

Could be caused by many things. You need to check your web browser's developer console for any related message or errors. Check your PHP and OpenCart error logs. Switch on the debug logging in the module and check the data.

Also search for possible causes.
viewtopic.php?t=210136

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by VladSiy » Thu Apr 29, 2021 2:34 am

Here is an entry from the error log.
Can this data narrow down the search for the problem? :)

Code: Select all

Unable to create Paypal session
{
	"TIMESTAMP":"2021-04-28T17:47:21Z",
	"CORRELATIONID":"4ff*******79",
	"ACK":"Failure",
	"VERSION":"109.0",
	"BUILD":"55*****66",
	"L_ERRORCODE0":"10002",
	"L_SHORTMESSAGE0":"Security error",
	"L_LONGMESSAGE0":"Security header is not valid",
	"L_SEVERITYCODE0":"Error"
}

Newbie

Posts

Joined
Wed Apr 28, 2021 5:58 pm
Location - Ukraine

Post by ADD Creative » Thu Apr 29, 2021 7:21 am

"Security header is not valid" usually means your credentials are wrong. Check them again, maybe there is whitespace at the start or end. They will also be different from your sandbox credentials.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by VladSiy » Sat May 01, 2021 1:57 pm

I have checked my API data many times already - they are correct, no spaces. API - 100% Live. I even sent the request directly to the request:

Code: Select all

https://api-3t.paypal.com/nvp?&user=xxxx&pwd=xxxx&signature=xxxx&version=109.0&METHOD=SetExpressCheckout&RETURNURL=http://www.paypal.com/test.php&CANCELURL=http://www.paypal.com/test.php&PAYMENTACTION=Sale&AMT=1&CURRENCYCODE=USD
Here is the answer:

Code: Select all

TIMESTAMP=2021%2d05%2d01T05%3a50%3a46Z&CORRELATIONID=9d965ef170d43&ACK=Failure&VERSION=109%2e0&BUILD=55576866&L_ERRORCODE0=10002&L_SHORTMESSAGE0=Security%20error&L_LONGMESSAGE0=Security%20header%20is%20not%20valid&L_SEVERITYCODE0=Error
Interestingly, if to

Code: Select all

https://api-3t.paypal.com/nvp...
I send the details of my other PayPal account, the parameter ACK = Success.

PayPal support says the same as you and most of the other answers to this question. But it doesn't work.
What else do you think I haven't taken into account, perhaps in the settings of the PayPal account itself?
Maybe it’s something very simple, but I don’t know about it. If you were in my place, what would you pay attention to?

In general, my task is to subscribe to recurring payments. As I understand it can only be done with PayPal Express Checkout?
Or is there another PayPal module, maybe PayPal Express Checkout is completely out of date?

Newbie

Posts

Joined
Wed Apr 28, 2021 5:58 pm
Location - Ukraine

Post by ADD Creative » Sat May 01, 2021 9:49 pm

Have you tried regenerating you PayPal API credentials in PayPal?

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by VladSiy » Sun May 02, 2021 4:03 pm

Yes, I deleted apps and created again.
I also created a new API certificate. And after that, I deleted and created new apps again.

Newbie

Posts

Joined
Wed Apr 28, 2021 5:58 pm
Location - Ukraine

Post by ADD Creative » Mon May 03, 2021 12:17 am

If one PayPal account works and the other doesn't doing the same test. And new credentials didn't help. Then this does suggest it something PayPal's end.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by straightlight » Mon May 03, 2021 12:56 am

Perhaps due to the latest policy changes: https://www.paypal.com/ca/webapps/mpp/u ... icies-full .

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by VladSiy » Fri May 07, 2021 9:40 pm

Thanks for the help.
PayPal tech support couldn't explain anything.
I created a new account, everything was set up without any problems. What is the problem, I still do not understand.

Newbie

Posts

Joined
Wed Apr 28, 2021 5:58 pm
Location - Ukraine

Post by Luftschlosser » Thu Oct 26, 2023 1:25 am

I have a similar problem now, but I already had everything working well until about half a year ago, when it suddenly stopped working. I switched to "PayPal Commerce Platform" then, but now I need to get back to PayPal Express to set up Recurring Payments.
I Have also created new Credentials, everything set up fine, and I even get an ACK=Success response:

Code: Select all

2023-10-25 18:50:24 - PayPal Express debug (Result): "TOKEN=EC%2d1CA71552PK926952E&TIMESTAMP=2023%2d10%2d25T16%3a50%3a24Z&CORRELATIONID=f4a74006agef7&ACK=Success&VERSION=109%2e0&BUILD=58205780"
But the PayPal Window shows "An Error occured" (no more info) and the payment isn't processed. In Sandbox mode everything works fine. Any ideas?

Newbie

Posts

Joined
Wed Feb 23, 2022 9:31 pm

Post by ADD Creative » Thu Oct 26, 2023 1:45 am

Luftschlosser wrote:
Thu Oct 26, 2023 1:25 am
I have a similar problem now, but I already had everything working well until about half a year ago, when it suddenly stopped working. I switched to "PayPal Commerce Platform" then, but now I need to get back to PayPal Express to set up Recurring Payments.
I Have also created new Credentials, everything set up fine, and I even get an ACK=Success response:

Code: Select all

2023-10-25 18:50:24 - PayPal Express debug (Result): "TOKEN=EC%2d1CA71552PK926952E&TIMESTAMP=2023%2d10%2d25T16%3a50%3a24Z&CORRELATIONID=f4a74006agef7&ACK=Success&VERSION=109%2e0&BUILD=58205780"
But the PayPal Window shows "An Error occured" (no more info) and the payment isn't processed. In Sandbox mode everything works fine. Any ideas?
Could be something PayPal's end. Have you contacted them?

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by Luftschlosser » Thu Oct 26, 2023 5:42 am

No I didn't. IS there a way to contact them? :o

...But I'm not so sure, I have the problem for a long time now and apparently no one else has this issue?
By the way, I also have removed the extension and installed it new again, but still the same. We have also tested it with multiple customer accounts.

Newbie

Posts

Joined
Wed Feb 23, 2022 9:31 pm

Post by ADD Creative » Thu Oct 26, 2023 7:38 am

Luftschlosser wrote:
Thu Oct 26, 2023 5:42 am
No I didn't. IS there a way to contact them? :o

...But I'm not so sure, I have the problem for a long time now and apparently no one else has this issue?
By the way, I also have removed the extension and installed it new again, but still the same. We have also tested it with multiple customer accounts.
You should find a contact link on the PayPal website.

If it used to work, have you may any changes to the site since, like upgrading to a later version of OpenCart?

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by Luftschlosser » Mon Oct 30, 2023 10:40 pm

I have contacted the technical support of PayPal and got a reply:
This is what is being sent to PayPal in the payment request.
paymentrequest_0_itemlengthvalue "80.00000000"
paymentrequest_0_itemlengthunit "mm"
paymentrequest_0_itemwidthvalue "55.00000000"
paymentrequest_0_itemwidthunit "mm"
paymentrequest_0_itemheightvalue "90.00000000"

https://developer.paypal.com/api/nvp-so ... estmessage

Per the documentation these values can only be a positive integer, which means instead of 90.000000000 it should be 90. If this information is being sent incorrectly it will cause buyers not to be able to pay.

To resolve this issue, please update the length, width, and height to be whole numbers.
Seems like this actually might be the issue! Is there anything I can do about it? Obviously I have entered whole numbers, OpenCart just adds decimal points for some reason.

And no, I didn't change anything when it stopped working, it seemed to happen out of the blue. Maybe I have added a new product or something, but no major changes to the system configuration at all.
Last edited by Luftschlosser on Mon Oct 30, 2023 10:42 pm, edited 1 time in total.

Newbie

Posts

Joined
Wed Feb 23, 2022 9:31 pm
Who is online

Users browsing this forum: No registered users and 49 guests