-
PayPal RESTful API Payment Module
This Zen Cart payment module (paypalr) combines the processing for the PayPal Payments Pro (paypaldp) and PayPal Express Checkout (paypalwpp) payment modules that are currently built into Zen Cart distributions. Instead of using the older NVP (Name Value Pair) methods to communicate with PayPal, this payment module uses PayPal's now-current REST APIs and combines the two legacy methods into one.
Zen Cart Support Thread: https://www.zen-cart.com/forumdisplay.php?170-PayPal-RESTful-support
Zen Cart Plugin Download Link: https://www.zen-cart.com/downloads.php?do=file&id=2382
The module's operation has been validated …
- With PHP versions 7.4 through 8.3; PHP 7.3 will result in fatal PHP errors!
- In Zen Cart's 3-page checkout environment (v1.5.8a and v2.0.0)
- With One-Page Checkout (OPC), v2.4.6
- Using OPC's guest-checkout feature.
- Both requiring confirmation and not!
- With both the built-in responsive_classic and ZCA Bootstrap (v3.6.1) templates.
For additional information, refer to the payment-module's wiki articles.
-
Re: PayPal RESTful API Payment Module
:beta:Please note: The current release (v1.0.0-beta4) is a beta version! While I've tested it extensively, I suggest giving it a try on your test site using a PayPal sandbox account first.
-
Re: PayPal RESTful API Payment Module
-
Re: PayPal RESTful API Payment Module
Credit to @lat9 for undertaking this labor of love.
Updated integrations with UPS, FedEx, USPS and now PayPal will give Zen Cart - and your stores - a new lease on life.
-
1 Attachment(s)
Re: PayPal RESTful API Payment Module
Zen Cart 1.5.8
Bootstrap 3.5.0
OPC 2.4.5
PHP 7.4.33
Payment modules installed: freecharger, moneyorder & paypalr
Order total modules installed: ot_shipping, ot_coupon, ot_subtotal, ot_tax & ot_subtotal
Shipping modules installed: freeshipper & usps
Other modules installed: RCS, Sales Report w/ Graphs & IH5.
Guest checkout, first test after configuration, clicked PayPal button... no checkbox/radio button seems very confusing with the express button on the checkout/payment page. The button is clickable, but goes no where.
Attachment 20448
So I click it, then confirm order and it fails to the following page & error.
Page Not Found
https://domain.com/cart/ppr_webhook_...=B8KWPQT6BCWP8
The logs looks very much like it completed its work... last few lines
2024-01-15 13:36:02: (checkout_one_confirmation) ==> End confirmPaymentSource
2024-01-15 13:36:02: (checkout_one_confirmation) pre_confirmation_check, sending the payer-action off to PayPal.
-
Re: PayPal RESTful API Payment Module
You missed the root-directory file ppr_webhook_main.php; that's where the 404 came from. Zen Cart 1.5.8 or 1.5.8a?
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
lat9
You missed the root-directory file ppr_webhook_main.php; that's where the 404 came from. Zen Cart 1.5.8 or 1.5.8a?
1.5.8
Sure did miss, thank a bunch!
~Melanie
-
Re: PayPal RESTful API Payment Module
There is still no radio/checkbox for the payment module. Noting it is the only payment displaying.
~Melanie
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
mprough
1.5.8
Sure did miss, thank a bunch!
~Melanie
Please note that I've only tested with zc158a and the current zc200-alpha. I won't be supporting any other Zen Cart base for the usage.
Quote:
Originally Posted by
mprough
There is still no radio/checkbox for the payment module. Noting it is the only payment displaying.
~Melanie
There is no radio/checkbox for the module since you've only got that one payment module installed. I'll rethink the means of identifying which (PayPal vs CC) sub-option is selected, but IMO using a radio/checkbox for the sub-option is ugly.
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
lat9
There is no radio/checkbox for the module since you've only got that one payment module installed. I'll rethink the means of identifying which (PayPal vs CC) sub-option is selected, but IMO using a radio/checkbox for the sub-option is ugly.
Maybe a selected state behavior, like a border? and the credit card one doesn't look at all like a selectable option, would need "buttonized" or something
-
Re: PayPal RESTful API Payment Module
I've just created a GitHub PR with some UI improvements (https://github.com/lat9/paypalr/pull/3), if you'd like to see before the next beta release.
-
1 Attachment(s)
Re: PayPal RESTful API Payment Module
Another website, different issue.
Zen Cart 1.5.8a
Bootstrap 3.5.2
PHP 7.4.33
On step 2 of 3 Payment Information we got the following error on an order.
Attachment 20450
No log was generated and my next test order went through.
It looks like part of the argument passed has a string too long.
~Melanie
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
mprough
Another website, different issue.
Zen Cart 1.5.8a
Bootstrap 3.5.2
PHP 7.4.33
On step 2 of 3 Payment Information we got the following error on an order.
Attachment 20450
No log was generated and my next test order went through.
It looks like part of the argument passed has a string too long.
~Melanie
For the beta phase, you should be running with the payment module's logs enabled; otherwise, I've got no breadcrumbs with which to diagnose the issue.
For that order, what do the ordered products "look like"?
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
lat9
For the beta phase, you should be running with the payment module's logs enabled; otherwise, I've got no breadcrumbs with which to diagnose the issue.
For that order, what do the ordered products "look like"?
I am PM'ing you the log, I rebuilt the customer's basket & retried the transaction. The order is all downloads.
Let me know if you need anything else.
~Melanie
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
mprough
I am PM'ing you the log, I rebuilt the customer's basket & retried the transaction. The order is all downloads.
Let me know if you need anything else.
~Melanie
Thanks for that. I'll review the base code to see what's up. The order "should be" marked as virtual.
Update: Replicated.
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
lat9
Thanks for that. I'll review the base code to see what's up. The order "should be" marked as virtual.
Update: Replicated.
Now corrected on the module's GitHub repo; see this commit for details: https://github.com/lat9/paypalr/comm...25797ecfc4880b
Thanks @mprough for the validation help, I really appreciate it!
-
Re: PayPal RESTful API Payment Module
v1.0.0-beta5 of PayPal RESTful is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2382
Full Changelog: v1.0.0-beta4...v1.0.0-beta5
Please note that I still consider this a beta release!:beta:
-
Re: PayPal RESTful API Payment Module
Zen Cart 1.5.8a; bootstrap 3.5.2; PHP 7.4.33
Upon trying a test checkout I get the following error... any idea what this error means?
2024-01-24 11:47:08: (index) ppr_webhook_main (return) starts.
{
"op": "return",
"token": "01L48731GX020100F",
"PayerID": "B8KWPQT6BCWP8",
"main_page": "index"
}
2024-01-24 11:47:08: (index) ==> Start getOrderStatus
TokenCache::get, using saved access-token.The curlGet (v2/checkout/orders/01L48731GX020100F) request was unsuccessful.
{
"errNum": 403,
"errMsg": "",
"curlErrno": 0,
"name": "NOT_AUTHORIZED",
"message": "Authorization failed due to insufficient permissions.",
"details": [
{
"issue": "PERMISSION_DENIED",
"description": "You do not have permission to access or perform operations on this resource."
}
]
}
CURL Options: {
"78": 10,
"52": false,
"75": true,
"74": true,
"42": 0,
"19913": true,
"13": 45,
"80": true,
"10002": "https:\/\/api-m.paypal.com\/v2\/checkout\/orders\/01L48731GX020100F"
}
2024-01-24 11:47:08: (index) ==> End getOrderStatus
2024-01-24 11:47:08: (index) ==> getOrderStatus failed, redirecting to shopping-cart
************************************************
~Melanie
-
Re: PayPal RESTful API Payment Module
@mprough, it's obviously some kind of permissions issue, but the log that you posted doesn't tell the full story. If the webhook's involved, then either the customer paid via paypal and was coming back to confirm and pay or the customer paid via credit card and was sent down a 3DS path for card validation.
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
lat9
@mprough, it's obviously some kind of permissions issue, but the log that you posted doesn't tell the full story. If the webhook's involved, then either the customer paid via paypal and was coming back to confirm and pay or the customer paid via credit card and was sent down a 3DS path for card validation.
I PM'd you the full log. It was my test transaction, regular PayPal was selected. Restful was the only payment module installed. I hit the confirm button, did the paypal login, clicked the pay button on paypal, was returned to the website shopping cart page. The item in my cart was retained, no order was created and I was still logged in.
Hope this helps =)
~Melanie
-
Re: PayPal RESTful API Payment Module
Are orders with different products successfully placed?
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
lat9
Are orders with different products successfully placed?
Different product, not digital, same issue... log same error as well.
In the morning I'll grab your patch & try again =)
~Melanie
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
mprough
Different product, not digital, same issue... log same error as well.
In the morning I'll grab your patch & try again =)
~Melanie
Please make sure you grab the patches: https://github.com/lat9/paypalr/comp...0-beta5...main
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
lat9
Unfortunately the error is the same. I am PMing you the logs =)
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
mprough
Unfortunately the error is the same. I am PMing you the logs =)
Does this issue happen on every transaction placed with PayPal?
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
lat9
Does this issue happen on every transaction placed with PayPal?
Every time, every product so far
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
mprough
Every time, every product so far
I'm still looking, but fairly stumped. I installed and enabled on a live site, just in case something was different, and had no such issue.
When you log into paypal.com for that business account, do you see a "You've been approved for Advanced Checkout" message at the top-of-screen?
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
lat9
I'm still looking, but fairly stumped. I installed and enabled on a live site, just in case something was different, and had no such issue.
When you log into paypal.com for that business account, do you see a "You've been approved for Advanced Checkout" message at the top-of-screen?
Another thing: The paypalr log now shows a "debug_id" associated with that error. If you get hold of PayPal's support and give them that value for the site, perhaps they'll have insight as to the root cause.
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
lat9
I'm still looking, but fairly stumped. I installed and enabled on a live site, just in case something was different, and had no such issue.
When you log into paypal.com for that business account, do you see a "You've been approved for Advanced Checkout" message at the top-of-screen?
It does, yes
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
mprough
It does, yes
Try sending a support ticket (https://www.paypal-support.com/s/?language=en_US) and include a copy of the logged information.
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
lat9
Quote:
Subject: Advanced Checkout API integration
Date Created: January 25, 2024
Recently you requested assistance from PayPal Merchant Technical Support. Below is a summary of your request. We are continuing to work on your issue. If you have any new details to add, please provide those in the case via the Merchant Technical Support portal at
https://www.paypal-support.com. NOTE: Please do NOT reply to this e-mail, as this mailbox is not monitored.
~Melanie
-
Re: PayPal RESTful API Payment Module
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
lat9
Thanks, Melanie!
So PayPal's response was to generate new keys which worked.
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
mprough
So PayPal's response was to generate new keys which worked.
Thanks for that, @mprough. I was seriously scratching my head. I'll add that to the payment-module's GitHub Wiki.
-
Re: PayPal RESTful API Payment Module
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
lat9
We ruining the issue, when we try to void the transaction, (Copy and past the Authorization ID, and hit Void and Confirm), then blank page.
here is the log:
PHP Parse error: syntax error, unexpected token "{" in /homepages/29/xxxxx/htdocs/xxxx/includes/modules/payment/paypal/PayPalRestful/Admin/DoVoid.php on line 84.
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
dsc7050
We ruining the issue, when we try to void the transaction, (Copy and past the Authorization ID, and hit Void and Confirm), then blank page.
here is the log:
PHP Parse error: syntax error, unexpected token "{" in /homepages/29/xxxxx/htdocs/xxxx/includes/modules/payment/paypal/PayPalRestful/Admin/DoVoid.php on line 84.
There is a missing close-bracket on line 84 of DoVoid.php
Code:
if (count($captured_txns) !== 0) {
I'll raise it as an issue on the GitHub repo.
-
Re: PayPal RESTful API Payment Module
Sorry for the obvious question, once this is up and running I assume it's recommended to disable PayPal Payments Pro and PayPal Express Checkout ?
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
Bubbadood
Sorry for the obvious question, once this is up and running I assume it's recommended to disable PayPal Payments Pro and PayPal Express Checkout ?
That's a yes. PayPal RESTful combines both of those existing modules into one up to date plugin.
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
simon1066
That's a yes. PayPal RESTful combines both of those existing modules into one up to date plugin.
Thank you
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
Bubbadood
Sorry for the obvious question, once this is up and running I assume it's recommended to disable PayPal Payments Pro and PayPal Express Checkout ?
To be very specific, the recommended operation will be to *retire* the old modules. See documentation:
https://docs.zen-cart.com/user/payment/paypal_restful/
https://docs.zen-cart.com/user/payment/retirement/
In 2.0.0, this can be done through the admin; in prior versions it requires a code tweak (shown on the second help page above).
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
swguy
Thank you for the clarification @swguy
-
Re: PayPal RESTful API Payment Module
Maybe another silly question, is this okay to use for UK paypal? As recently paypal pro was stopped for most here due to the verified updates. I did move to another payment provider, but interesting to see how this goes in the future.
-
Re: PayPal RESTful API Payment Module
Is the pre-158 retirement procedure needed witht the mod not supporting pre-158?
Asking for a friend:P
-
Re: PayPal RESTful API Payment Module
It doesn't say "pre-1.5.8" it says "1.5.8 and Prior." I am highly confident that someone will (at least attempt to) do the fiddling to make it work on a pre-1.5.8 site.
-
Re: PayPal RESTful API Payment Module
Just wondering if we should send non-coders like myself on a Don Quixote mission. :P
-
Re: PayPal RESTful API Payment Module
I can change it to "Prior to 2.0.0" for clarity.
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
HeathenMagic
Maybe another silly question, is this okay to use for UK paypal? As recently paypal pro was stopped for most here due to the verified updates. I did move to another payment provider, but interesting to see how this goes in the future.
I've not tried on a UK PayPal site, but based on PayPal's documentation I believe that the payment module should work for UK PayPal as well.
-
Re: PayPal RESTful API Payment Module
Thanks for that. I might try it in the near future.
-
Re: PayPal RESTful API Payment Module
v1.0.1 of the payment module is now available for download.
This release corrects GitHub issue #12 (PHP Parse error occurs when doing transaction void).
-
Re: PayPal RESTful API Payment Module
Having some issues with v1.0.1 ... 2 different sites, both fresh plugin installs as well as 1 upgrade, which is unaffected & without error is (Zen 1.5.8; PHP 7.4.33; bootstrap 3.5.2; OPC 2.4.5)
#1 Zen 1.5.8; PHP 7.4.33; bootstrap 3.5.0; OPC 2.4.5
#2 Zen 1.5.8; PHP 7.4.33; bootstrap 3.5.0; OPC 2.4.5
Logs
Quote:
[14-Feb-2024 15:23:38 UTC] Request URI: /XXX/index.php?cmd=modules&set=payment&module=paypalr, IP address: 000.000.000.000
#1 paypaldp->__construct() called at [/home/XXXX/public_html/XXX/modules.php:187]
#2 require(/home/XXXX/public_html/XXX/modules.php) called at [/home/XXXX/public_html/XXX/index.php:11]
--> PHP Warning: Use of undefined constant MODULE_PAYMENT_PAYPALDP_DEBUGGING - assumed 'MODULE_PAYMENT_PAYPALDP_DEBUGGING' (this will throw an Error in a future version of PHP) in /home/XXXX/public_html/includes/modules/payment/paypaldp.php on line 268.
[14-Feb-2024 15:23:38 UTC] Request URI: /XXX/index.php?cmd=modules&set=payment&module=paypalr, IP address: 000.000.000.000
#1 paypaldp->__construct() called at [/home/XXXX/public_html/XXX/modules.php:187]
#2 require(/home/XXXX/public_html/XXX/modules.php) called at [/home/XXXX/public_html/XXX/index.php:11]
--> PHP Warning: Use of undefined constant MODULE_PAYMENT_PAYPALDP_DEBUGGING - assumed 'MODULE_PAYMENT_PAYPALDP_DEBUGGING' (this will throw an Error in a future version of PHP) in /home/XXXX/public_html/includes/modules/payment/paypaldp.php on line 268.
[14-Feb-2024 15:23:38 UTC] Request URI: /XXX/index.php?cmd=modules&set=payment&module=paypalr, IP address: 000.000.000.000
#1 paypaldp->__construct() called at [/home/XXXX/public_html/XXX/modules.php:187]
#2 require(/home/XXXX/public_html/XXX/modules.php) called at [/home/XXXX/public_html/XXX/index.php:11]
--> PHP Warning: Use of undefined constant MODULE_PAYMENT_PAYPALDP_DEBUGGING - assumed 'MODULE_PAYMENT_PAYPALDP_DEBUGGING' (this will throw an Error in a future version of PHP) in /home/XXXX/public_html/includes/modules/payment/paypaldp.php on line 282.
[14-Feb-2024 15:23:38 UTC] Request URI: /XXX/index.php?cmd=modules&set=payment&module=paypalr, IP address: 000.000.000.000
#1 paypaldp->__construct() called at [/home/XXXX/public_html/XXX/modules.php:187]
#2 require(/home/XXXX/public_html/XXX/modules.php) called at [/home/XXXX/public_html/XXX/index.php:11]
--> PHP Warning: Use of undefined constant MODULE_PAYMENT_PAYPALDP_DEBUGGING - assumed 'MODULE_PAYMENT_PAYPALDP_DEBUGGING' (this will throw an Error in a future version of PHP) in /home/XXXX/public_html/includes/modules/payment/paypaldp.php on line 282.
[14-Feb-2024 15:23:38 UTC] Request URI: /XXX/index.php?cmd=modules&set=payment&module=paypalr, IP address: 000.000.000.000
#1 paypaldp->__construct() called at [/home/XXXX/public_html/XXX/modules.php:187]
#2 require(/home/XXXX/public_html/XXX/modules.php) called at [/home/XXXX/public_html/XXX/index.php:11]
--> PHP Warning: Use of undefined constant MODULE_PAYMENT_PAYPALDP_DEBUGGING - assumed 'MODULE_PAYMENT_PAYPALDP_DEBUGGING' (this will throw an Error in a future version of PHP) in /home/XXXX/public_html/includes/modules/payment/paypaldp.php on line 283.
[14-Feb-2024 15:23:38 UTC] Request URI: /XXX/index.php?cmd=modules&set=payment&module=paypalr, IP address: 000.000.000.000
#1 paypaldp->__construct() called at [/home/XXXX/public_html/XXX/modules.php:187]
#2 require(/home/XXXX/public_html/XXX/modules.php) called at [/home/XXXX/public_html/XXX/index.php:11]
--> PHP Warning: Use of undefined constant MODULE_PAYMENT_PAYPALDP_DEBUGGING - assumed 'MODULE_PAYMENT_PAYPALDP_DEBUGGING' (this will throw an Error in a future version of PHP) in /home/XXXX/public_html/includes/modules/payment/paypaldp.php on line 283.
[14-Feb-2024 15:23:38 UTC] Request URI: /XXX/index.php?cmd=modules&set=payment&module=paypalr, IP address: 000.000.000.000
#1 paypaldp->__construct() called at [/home/XXXX/public_html/XXX/modules.php:187]
#2 require(/home/XXXX/public_html/XXX/modules.php) called at [/home/XXXX/public_html/XXX/index.php:11]
--> PHP Warning: Use of undefined constant MODULE_PAYMENT_PAYPALDP_DEBUGGING - assumed 'MODULE_PAYMENT_PAYPALDP_DEBUGGING' (this will throw an Error in a future version of PHP) in /home/XXXX/public_html/includes/modules/payment/paypaldp.php on line 283.
Quote:
************************************************
2024-02-14 15:08:11: (checkout_one) validateCredentials: Checking (1).
TokenCache::clear, clearing cached token.
The curlPost (v1/oauth2/token) request was successful (200).
{
"token_type": "Bearer",
"expires_in": 32007
}
TokenCache::save, saving access-token; valid for 32007 seconds.
************************************************
************************************************
2024-02-14 15:08:18: (checkout_one) validateCredentials: Checking (1).
TokenCache::get, using saved access-token; expires in 32000 seconds.
************************************************
************************************************
2024-02-14 15:08:18: (checkout_one_confirmation) validateCredentials: Checking (1).
TokenCache::get, using saved access-token; expires in 32000 seconds.
************************************************
************************************************
2024-02-14 15:08:18: (checkout_one_confirmation) pre_confirmation_check starts ...
We are unable to process your PayPal Checkout payment at this time. Please contact us for assistance.
************************************************
2024-02-14 15:09:00: (checkout_one) validateCredentials: Checking (1).
TokenCache::get, using saved access-token; expires in 31958 seconds.
************************************************
************************************************
2024-02-14 15:09:03: (checkout_one) validateCredentials: Checking (1).
TokenCache::get, using saved access-token; expires in 31955 seconds.
************************************************
************************************************
2024-02-14 15:09:03: (checkout_one_confirmation) validateCredentials: Checking (1).
TokenCache::get, using saved access-token; expires in 31955 seconds.
************************************************
************************************************
2024-02-14 15:09:03: (checkout_one_confirmation) pre_confirmation_check starts ...
We are unable to process your PayPal Checkout payment at this time. Please contact us for assistance.
Quote:
************************************************
2024-02-14 15:08:57: () validateCredentials: Checking ().The curlPost (v1/oauth2/token) request was successful (200).
{
"token_type": "Bearer",
"expires_in": 31961
}
************************************************
************************************************
2024-02-14 15:08:57: () validateCredentials: Checking ().The curlPost (v1/oauth2/token) request was successful (200).
{
"token_type": "Bearer",
"expires_in": 31960
}
************************************************
I also have an OPC log that looks ok, I can pm you if needed.
Thanks
~Melanie
-
Re: PayPal RESTful API Payment Module
Those logs are being generated by paypaldp, not paypalr:
Code:
--> PHP Warning: Use of undefined constant MODULE_PAYMENT_PAYPALDP_DEBUGGING - assumed 'MODULE_PAYMENT_PAYPALDP_DEBUGGING' (this will throw an Error in a future version of PHP) in /home/XXXX/public_html/includes/modules/payment/paypaldp.php on line 268.
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
mprough
Having some issues with v1.0.1 ... 2 different sites, both fresh plugin installs as well as 1 upgrade, which is unaffected & without error is (Zen 1.5.8; PHP 7.4.33; bootstrap 3.5.2; OPC 2.4.5)
#1 Zen 1.5.8; PHP 7.4.33; bootstrap 3.5.0; OPC 2.4.5
#2 Zen 1.5.8; PHP 7.4.33; bootstrap 3.5.0; OPC 2.4.5
Logs
I also have an OPC log that looks ok, I can pm you if needed.
Thanks
~Melanie
I know, but no logs before the installation, thought it might be related. The new plugin isn't working, gives me "We are unable to process your PayPal Checkout payment at this time. Please contact us for assistance."
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
mprough
I know, but no logs before the installation, thought it might be related. The new plugin isn't working, gives me "We are unable to process your PayPal Checkout payment at this time. Please contact us for assistance."
Did paypalr auto-disable itself for some reason?
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
lat9
Did paypalr auto-disable itself for some reason?
Yes, everytime.
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
mprough
Yes, everytime.
To be clear, I set up the module... test transaction causes "We are unable to process your PayPal Checkout payment at this time. Please contact us for assistance." and the plugin turns itself off.
=)
Melanie
-
Re: PayPal RESTful API Payment Module
@mprough, you'd indicated
Code:
Having some issues with v1.0.1 ... 2 different sites, both fresh plugin installs as well as 1 upgrade, which is unaffected & without error is (Zen 1.5.8; PHP 7.4.33; bootstrap 3.5.2; OPC 2.4.5)
#1 Zen 1.5.8; PHP 7.4.33; bootstrap 3.5.0; OPC 2.4.5
#2 Zen 1.5.8; PHP 7.4.33; bootstrap 3.5.0; OPC 2.4.5
Are all three sites running on the same server?
In reviewing the changes from Bootstrap 3.5.0 to 3.5.2, I'm not seeing anything that stands out as a potential source of the issue. I'll note, though, that my testing was done with Zen Cart 1.5.8a and Bootstrap 3.6.2.
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
lat9
@mprough, you'd indicated
Code:
Having some issues with v1.0.1 ... 2 different sites, both fresh plugin installs as well as 1 upgrade, which is unaffected & without error is (Zen 1.5.8; PHP 7.4.33; bootstrap 3.5.2; OPC 2.4.5)
#1 Zen 1.5.8; PHP 7.4.33; bootstrap 3.5.0; OPC 2.4.5
#2 Zen 1.5.8; PHP 7.4.33; bootstrap 3.5.0; OPC 2.4.5
Are all three sites running on the same server?
In reviewing the changes from Bootstrap 3.5.0 to 3.5.2, I'm not seeing anything that stands out as a potential source of the issue. I'll note, though, that my testing was done with Zen Cart 1.5.8
a and Bootstrap 3.6.2.
I actually have 5 of these now. 3 on the same servers, 4 servers in all... 3 different hosts
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
mprough
I actually have 5 of these now. 3 on the same servers, 4 servers in all... 3 different hosts
... and the respective Zen Cart, PHP, OPC and Bootstrap versions?
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
lat9
... and the respective Zen Cart, PHP, OPC and Bootstrap versions?
very similar
-
Re: PayPal RESTful API Payment Module
That's not helpful, I'm looking for a "pattern" for the failure so I need specifics.
-
Re: PayPal RESTful API Payment Module
My best guess is that, for the sites that are auto-disabling after successfully retrieving the PayPal OAuth token, the required changes to the order_totals.php class were not applied: https://github.com/lat9/paypalr/wiki...r_total.php%60
-
Re: PayPal RESTful API Payment Module
I just installed Paypal Restful 1.01 on our test server and came up against an issue with card processing.
Code:
2024-03-09 14:04:23: (checkout_process) ==> Start createOrder
TokenCache::get, using saved access-token; expires in 32362 seconds.
The curlPost (v2/checkout/orders) request was unsuccessful.
{
"errNum": 400,
"errMsg": "",
"curlErrno": 0,
"name": "INVALID_REQUEST",
"message": "Request is not well-formed, syntactically incorrect, or violates schema.",
"details": [
{
"field": "\/purchase_units\/@reference_id=='default'\/supplementary_data\/card\/level3\/ships_from_postal_code",
"value": "TQ12 5TZ",
"location": "body",
"issue": "must match \"^[a-zA-Z0-9_'.-]*$\""
}
],
"debug_id": "8a641239069c5"
}
...
2024-03-09 14:04:23: (checkout_process) ==> End createOrderAn error occurred when we tried to process your credit card. Please try again, select an alternate payment method or contact us for assistance.
A correctly-formatted UK postcode has a space in it, as above. Paypal appears to have rejected it because it isn't expecting a space. This is not necessarily the fault of the Zen Cart payment module but I managed to get around it by editing includes/modules/payment/paypal/PayPalRestful/Zc2Pp/CreatePayPalOrderRequest.php, changing:
Code:
if (SHIPPING_ORIGIN_ZIP !== '') {
$level_3['ships_from_postal_code'] = SHIPPING_ORIGIN_ZIP;
}
to:
Code:
if (SHIPPING_ORIGIN_ZIP !== '') {
$level_3['ships_from_postal_code'] = str_replace(' ', '', SHIPPING_ORIGIN_ZIP);
}
at line 466 to remove the space.
After that, the card payment went through fine. It might be worth looking into this further as the workaround might not be the right way to fix it.
-
Re: PayPal RESTful API Payment Module
I couldn't find anything in the Paypal API docs that specifies the format of the ships_from_postal_code field. Only that it shoudl be 1-60 characters long.
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
BillJ
I just installed Paypal Restful 1.01 on our test server and came up against an issue with card processing.
Code:
2024-03-09 14:04:23: (checkout_process) ==> Start createOrder
TokenCache::get, using saved access-token; expires in 32362 seconds.
The curlPost (v2/checkout/orders) request was unsuccessful.
{
"errNum": 400,
"errMsg": "",
"curlErrno": 0,
"name": "INVALID_REQUEST",
"message": "Request is not well-formed, syntactically incorrect, or violates schema.",
"details": [
{
"field": "\/purchase_units\/@reference_id=='default'\/supplementary_data\/card\/level3\/ships_from_postal_code",
"value": "TQ12 5TZ",
"location": "body",
"issue": "must match \"^[a-zA-Z0-9_'.-]*$\""
}
],
"debug_id": "8a641239069c5"
}
...
2024-03-09 14:04:23: (checkout_process) ==> End createOrderAn error occurred when we tried to process your credit card. Please try again, select an alternate payment method or contact us for assistance.
A correctly-formatted UK postcode has a space in it, as above. Paypal appears to have rejected it because it isn't expecting a space. This is not necessarily the fault of the Zen Cart payment module but I managed to get around it by editing
includes/modules/payment/paypal/PayPalRestful/Zc2Pp/CreatePayPalOrderRequest.php, changing:
Code:
if (SHIPPING_ORIGIN_ZIP !== '') {
$level_3['ships_from_postal_code'] = SHIPPING_ORIGIN_ZIP;
}
to:
Code:
if (SHIPPING_ORIGIN_ZIP !== '') {
$level_3['ships_from_postal_code'] = str_replace(' ', '', SHIPPING_ORIGIN_ZIP);
}
at line 466 to remove the space.
After that, the card payment went through fine. It might be worth looking into this further as the workaround might not be the right way to fix it.
Quote:
Originally Posted by
BillJ
I couldn't find anything in the Paypal API docs that specifies the format of the ships_from_postal_code field. Only that it shoudl be 1-60 characters long.
Thanks for sussing that out; I've opened a GitHub issue to track the change (https://github.com/lat9/paypalr/issues/14) and use your suggested correction.
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
lat9
Thanks. Other than that it looks great and I'm going to install it on our production server. Since it replaces Paypal Express, are there any plans to implement the Paypal Express Checkout button?
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
BillJ
Thanks. Other than that it looks great and I'm going to install it on our production server. Since it replaces Paypal Express, are there any plans to implement the Paypal Express Checkout button?
I've got no plans for a PayPal Express Checkout button at this time; the best I can offer is that the payment module works with the guest-checkout feature of One-Page Checkout.
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
lat9
I've got no plans for a PayPal Express Checkout button at this time; the best I can offer is that the payment module works with the guest-checkout feature of One-Page Checkout.
That's a fair trade. I always thought the Express Checkout button added a lot of complexity to the checkout code.
-
Re: PayPal RESTful API Payment Module
-
Re: PayPal RESTful API Payment Module
Will this be part of the ZC 2.0 release?
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
Webskipper
Will this be part of the ZC 2.0 release?
Nope, it needs to "get its feet wet" before committing to core.
-
Re: PayPal RESTful API Payment Module
ZC 1.5.8a
PHP 8.1.27
PayPal Checkout (RESTful) 1.0.1
OPC 2.4.6
Square WebPay 1.2.0
I get this warning when voiding a transaction
Code:
[20-Mar-2024 14:29:00 Europe/London] Request URI: /MY_ADMIN/index.php?cmd=orders&page=1&oID=1391&action=doVoid, IP address: xx.xx.xx.xx, Language id 1
#0 /home/MY_DOMAIN/public_html/includes/modules/payment/paypal/PayPalRestful/Admin/DoVoid.php(92): zen_debug_error_handler()
#1 /home/MY_DOMAIN/public_html/includes/modules/payment/paypalr.php(1912): PayPalRestful\Admin\DoVoid->__construct()
#2 /home/MY_DOMAIN/public_html/MY_ADMIN/orders.php(405): paypalr->_doVoid()
#3 /home/MY_DOMAIN/public_html/MY_ADMIN/index.php(11): require('...')
--> PHP Warning: Undefined variable $last_auth_txn in /home/MY_DOMAIN/public_html/includes/modules/payment/paypal/PayPalRestful/Admin/DoVoid.php on line 92.
[20-Mar-2024 14:29:00 Europe/London] Request URI: /MY_ADMIN/index.php?cmd=orders&page=1&oID=1391&action=doVoid, IP address: xx.xx.xx.xx, Language id 1
#0 /home/MY_DOMAIN/public_html/includes/modules/payment/paypal/PayPalRestful/Admin/DoVoid.php(92): zen_debug_error_handler()
#1 /home/MY_DOMAIN/public_html/includes/modules/payment/paypalr.php(1912): PayPalRestful\Admin\DoVoid->__construct()
#2 /home/MY_DOMAIN/public_html/MY_ADMIN/orders.php(405): paypalr->_doVoid()
#3 /home/MY_DOMAIN/public_html/MY_ADMIN/index.php(11): require('...')
--> PHP Warning: Trying to access array offset on value of type null in /home/MY_DOMAIN/public_html/includes/modules/payment/paypal/PayPalRestful/Admin/DoVoid.php on line 92.
and because of this (I assume) the Trans ID is blank in the admin orders 'voided' comments block
----------------------------
VOIDED. Trans ID: [blank]
Transaction voided.
----------------------------
-
Re: PayPal RESTful API Payment Module
GitHub issue created to track the correction: https://github.com/lat9/paypalr/issues/15
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
lat9
... and correction provided in this GitHub commit: https://github.com/lat9/paypalr/comm...172c2de30bafad
-
Re: PayPal RESTful API Payment Module
I noticed some behaviour yesterday that I didn't expect (and some that I did, for contrast).
Firstly, what I *did* expect:
A customer tried to place an order and Paypal didn't trust the card. I received an e-mail:
"ALERT: PayPal Checkout Error (Lost/Stolen/Fraudulent Card)" containing some of the card details. No order was created and the customer tried and failed a couple more times before trying a different card and paying successfully. This time the order was created.
Then what I *didn't* expect:
A different customer tried to place an order and their card was declined for some unspecified reason. I received an e-mail:
"ALERT: PayPal Checkout Error (Order Requires Attention)", "The status for order #23510 was forced to "Pending" due to a PayPal response status of 'DECLINED'"
The order was created and the status set to "Pending" as per the e-mail notification.
When I spoke to the customer to ask for payment via another card (they are a regular business-to-business customer) they weren't aware the payment had failed. However, I cannot say whether that is because they were not notified or just because they didn't notice and that isn't really the issue.
We are not used to seeing an order being created after a failed payment and we have always been able to assume that an order from the web-site is paid for and ready to be shipped, without any further examination of its status. Is this expected behaviour? I suppose it must be since there was a specific e-mail notification for that event.
-
Re: PayPal RESTful API Payment Module
I forgot to say I'm using ZC 1.58a, OPC 2.4.6 and PP Restful 1.0.1
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
BillJ
I noticed some behaviour yesterday that I didn't expect (and some that I did, for contrast).
Firstly, what I *did* expect:
A customer tried to place an order and Paypal didn't trust the card. I received an e-mail:
"ALERT: PayPal Checkout Error (Lost/Stolen/Fraudulent Card)" containing some of the card details. No order was created and the customer tried and failed a couple more times before trying a different card and paying successfully. This time the order was created.
Then what I *didn't* expect:
A different customer tried to place an order and their card was declined for some unspecified reason. I received an e-mail:
"ALERT: PayPal Checkout Error (Order Requires Attention)", "The status for order #23510 was forced to "Pending" due to a PayPal response status of 'DECLINED'"
The order was created and the status set to "Pending" as per the e-mail notification.
When I spoke to the customer to ask for payment via another card (they are a regular business-to-business customer) they weren't aware the payment had failed. However, I cannot say whether that is because they were not notified or just because they didn't notice and that isn't really the issue.
We are not used to seeing an order being created after a failed payment and we have always been able to assume that an order from the web-site is paid for and ready to be shipped, without any further examination of its status. Is this expected behaviour? I suppose it must be since there was a specific e-mail notification for that event.
Are you running paypalr in Auth-Only or Final-Payment mode? Do you know if there was an SCA path taken when the payment was processed?
I'll note that what you describe as unexpected is unexpected!
-
Re: PayPal RESTful API Payment Module
Thank you.
Quote:
Originally Posted by
lat9
Are you running paypalr in Auth-Only or Final-Payment mode?
I have Payment Action set to "Final Sale" in the paypalr configuration, if that's the setting you mean.
Quote:
Originally Posted by
lat9
Do you know if there was an SCA path taken when the payment was processed?
I don't know, sorry. Would it be logged somewhere by paypalr? I have debugging switched on. There was a Paypal transaction number stored in Zen Cart but it was not recognised when I searched for it in our Paypal account.
The card the customer used was not their usual card that we keep on file for telephone orders and they don't often order online anyway so it might have triggered SCA. However that is just speculation.
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
BillJ
Thank you.
I have Payment Action set to "Final Sale" in the paypalr configuration, if that's the setting you mean.
I don't know, sorry. Would it be logged somewhere by paypalr? I have debugging switched on. There was a Paypal transaction number stored in Zen Cart but it was not recognised when I searched for it in our Paypal account.
The card the customer used was not their usual card that we keep on file for telephone orders and they don't often order online anyway so it might have triggered SCA. However that is just speculation.
If debugging was switched on when the errant transaction was run, there will be a paypalr-c-{cid}-ffflll-yyyymmdd.log present. {cid} is the customer's ID and {ffflll} is the first 3 characters of the customer's first/last name. If you find such a log, send me a PM and I'll send back my direct email address.
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
lat9
If debugging was switched on when the errant transaction was run, there will be a paypalr-c-{cid}-ffflll-yyyymmdd.log present. {cid} is the customer's ID and {ffflll} is the first 3 characters of the customer's first/last name. If you find such a log, send me a PM and I'll send back my direct email address.
Thank you. Log on its way.
I can see from the log that the card failed the CVV check. The customer probably mis-typed it. Despite having an account, they had checked out as a guest using OPC.
-
Re: PayPal RESTful API Payment Module
Hello. I'm between a bit of a rock and a hard place. I'm still on 1.5.7D (I know), which this module does not support. It also looks like PayPal is no longer accepting signups for Website Payments Pro so I can't use that module. Express works fine for PayPal, but I want to also use PayPal for credit card transactions. Do I have any viable options short of an upgrade? Would the old Payments Standard work? Could I convert the lang file back to the old format and get the new mod to work in 1.5.7? I figured I'd explore these options before looking at something else like Square.
Thanks much.
-
Re: PayPal RESTful API Payment Module
Unless told to do so, PayPal will try to get folks to open an account by "hiding" the option for credit card use after so many times the card is used on their system without an actual PayPal account.
If you have the right PayPal account, you can use the steps at https://myzencarthost.com/index.php?...d-Setting.html to setup PayPal Express to always present the credit card option.
I would still go with some other form of credit card processing simply to have a backup if one is down. You never know when one might go down. Square was inop for several hours not too long ago. Twitter was down for 43 minutes this morning and T-Mobile for 39.
neat link - https://downforeveryoneorjustme.com/
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
BillJ
Thank you. Log on its way.
I can see from the log that the card failed the CVV check. The customer probably mis-typed it. Despite having an account, they had checked out as a guest using OPC.
I'm not seeing receipt of that log, nor am I able to reproduce on PayPal's sandbox.
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
lat9
I'm not seeing receipt of that log, nor am I able to reproduce on PayPal's sandbox.
I've just had another one this evening. I'll PM for your e-mail address in case I got it wrong last time.
-
Re: PayPal RESTful API Payment Module
v1.0.2 of the PayPal RESTful payment module is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2382
This release contains changes associated with the following GitHub issues:
#13: Full cost breakdown not submitted to PayPal when the order has discounts
#14: Level-3 Data's ships_from_postal_code "doesn't like" intervening blanks
#15: Correct PHP Warning when voiding a transaction.
#16: Show spinner on transition from the webhook to the target page.
#17: "Identify" as a payment module that collects card-data on-site.
#18: Correctly identify 3DS declined transactions; orders were invalidly being created.
#19: Set an error message in the API class when an interface error is detected.
#20: Correct addresses in the "Channel Islands" (and others) being disallowed.
#21: Correct method-/constant-names when a card-declined reason-code isn't recognized.
#22: Adding more "recognized" card-declined reason-codes.
Many thanks to @BillJ for his help in debugging and correcting those 3DS-related issues!
-
Re: PayPal RESTful API Payment Module
ZenCart v1.5.8a
PayPal checkout (RESTful) v1.0.2
PayPal checkout (RESTful) turns itself off and sends an email: "The required notifications in the order_total.php class were not applied; the payment module cannot place orders. The payment module has been automatically disabled."
Error log:
Quote:
2024-05-11 18:17:15: (checkout_payment) validateCredentials: Checking (1).
TokenCache::get, using saved access-token; expires in 32210 seconds.
************************************************
************************************************
2024-05-11 18:17:21: (checkout_confirmation) validateCredentials: Checking (1).
TokenCache::get, using saved access-token; expires in 32204 seconds.
************************************************
************************************************
2024-05-11 18:17:21: (checkout_confirmation) pre_confirmation_check starts ...
We are unable to process your PayPal Checkout payment at this time. Please contact us for assistance.
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
siliconbug
ZenCart v1.5.8a
PayPal checkout (RESTful) v1.0.2
PayPal checkout (RESTful) turns itself off and sends an email: "The required notifications in the order_total.php class were not applied; the payment module cannot place orders. The payment module has been automatically disabled."
Error log:
Did you apply the required core-file changes identified here? https://github.com/lat9/paypalr/wiki...r_total.php%60
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
lat9
It works, thank you!
-
1 Attachment(s)
Re: PayPal RESTful API Payment Module
ZCA Bootstrap Template v3.6.5
The zoom in/out setting of my browser is 100%, but the Discover Card logo isn't in the same row. Is there any setting I can adjust in this module?
Attachment 20607
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
siliconbug
ZCA Bootstrap Template v3.6.5
The zoom in/out setting of my browser is 100%, but the Discover Card logo isn't in the same row. Is there any setting I can adjust in this module?
Attachment 20607
You'll need to provide a template-override for the payment-module's .css file. Copy /includes/modules/payment/paypal/PayPalRestful/paypalr.css to /includes/templates/YOUR_TEMPLATE/css/paypalr.css and then edit this section:
Code:
.ppr-button-choice label {
cursor: pointer;
height: 2.5rem;
font-weight: bold;
width: 11rem;
display: inline-block;
text-align: center;
}
to adjust the width. It looks like 15rem should work.
-
1 Attachment(s)
Re: PayPal RESTful API Payment Module
Thank you!
I copied /includes/modules/payment/paypal/PayPalRestful/paypalr.css to /includes/templates/bootstrap/css/paypalr.css and then changed the width to 15rem or bigger number, but nothing happened.
Attachment 20610
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
siliconbug
Thank you!
I copied /includes/modules/payment/paypal/PayPalRestful/paypalr.css to /includes/templates/bootstrap/css/paypalr.css and then changed the width to 15rem or bigger number, but nothing happened.
Attachment 20610
My bad. Since you're using the Bootstrap template, copy the paypalr_bootstrap.css file and make the changes there.
-
Re: PayPal RESTful API Payment Module
-
Re: PayPal RESTful API Payment Module
Cindy,
I am finally getting my 2.0 site up to the point to start testing payment modules. I only saw that this is the new Paypal standard early this morning. We have used Paypal Express almost exclusively to this point. I have read through this entire thread and you mentioned a couple of times that you consider this a Beta release. Is that still accurate?
Also I have installed a new clean 2.0.1 as a dev site on my host and most things are working great (I did the database only upgrade). But I am always uncomfortable testing payment modules. My url for this site is formed like mysite.myhost.com NOT mysite.com so I am curious if that will cause any testing issues. I do have SSL working and that site is trusted. Any thoughts?
I still need to install OPC and EP4 but I am getting close and I wanted to plan out my final testing. I plan to install Zelle and Square as well but Paypal must be working first.
Thanks
Chris
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
g2ktcf
Cindy,
I am finally getting my 2.0 site up to the point to start testing payment modules. I only saw that this is the new Paypal standard early this morning. We have used Paypal Express almost exclusively to this point. I have read through this entire thread and you mentioned a couple of times that you consider this a Beta release. Is that still accurate?
Also I have installed a new clean 2.0.1 as a dev site on my host and most things are working great (I did the database only upgrade). But I am always uncomfortable testing payment modules. My url for this site is formed like mysite.myhost.com NOT mysite.com so I am curious if that will cause any testing issues. I do have SSL working and that site is trusted. Any thoughts?
I still need to install OPC and EP4 but I am getting close and I wanted to plan out my final testing. I plan to install Zelle and Square as well but Paypal must be working first.
Thanks
Chris
No longer beta; make sure you get the updates for v1.0.2 of the payment module. This thread's been pretty quiet for a while.
-
Re: PayPal RESTful API Payment Module
Paypal RESTful 1.0.2
Zen Cart 1.58a
Today I tried to make a partial refund. When the dialog came up I entered the amount and clicked the blue "Refund" button. When the red "Confirm" button appeared I inadvertently clicked on it twice. When the page refreshed I saw that two separate refunds had been logged so the customer got his refund twice.
Perhaps it would be worth disabling the button(s) once "Confirm" is clicked, or dismissing the dialog. That would also give some feedback that the process has been initiated. Otherwise the only indication is from the browser (for example, Chrome changes the "reload" button to an "X" while loading the page) and it isn't very obvious.
Finally, one minor enhancement would be to place the refund transaction ID on the message stack so it appears at the top of the page like it does on the "old" Paypal module and others. That makes it easier to copy the ID to put in our accounts system when we create a refund, since the ID is right at the top of the page when the page reloads. It isn't a big hassle to scroll down to the messages to find it there, though.
-
Re: PayPal RESTful API Payment Module
-
Re: PayPal RESTful API Payment Module
Quote:
Originally Posted by
lat9
Thank you! :thumbsup:
-
Re: PayPal RESTful API Payment Module
Zen Cart v1.58a
Paypal RESTful v1.0.2
Payment Action: Auth Only
I disable PayPal Express Checkout and enable Paypal RESTful today.
There are two orders. The 1st order is paid by PayPal Wallet, and the 2nd order is paid by Credit Card.
The 1st payment goes through, but the 2nd order gives me an error:
Quote:
The payment module's observer (auto.paypalrestful.php) was not loaded; the payment module has been disabled. The payment module has been automatically disabled.
Both orders get this error when I capture the payments, but I can get correct $$ into my PayPal account:
Quote:
Request URI: /ipn_main_handler.php, IP address: 173.0.81.140, Language id 1
--> PHP Warning: Use of undefined constant MODULE_PAYMENT_PAYPAL_ORDER_STATUS_ID - assumed 'MODULE_PAYMENT_PAYPAL_ORDER_STATUS_ID' (this will throw an Error in a future version of PHP) in /zencart/ipn_main_handler.php on line 475.
Something under PayPal Transactions doesn't look right.
Attachment 20651
Should I remove PayPal Express Checkout completely? Or any possible issue I missed?
-
Re: PayPal RESTful API Payment Module
Why would I be getting an expired token? This is me trying to ENABLE the RESTful module.
Code:
2024-06-13 08:25:24: () validateCredentials: Checking ().
TokenCache::clear, clearing cached token.
The curlPost (v1/oauth2/token) request was unsuccessful.
{
"errNum": 401,
"errMsg": "An expired-token error was received.",
"curlErrno": 0,
"name": "n\/a",
"message": "n\/a",
"details": "n\/a",
"debug_id": "n\/a"
}
CURL Options: {
"78": 10,
"52": false,
"75": true,
"74": true,
"42": 0,
"19913": true,
"13": 45,
"47": true,
"10002": "https:\/\/api-m.paypal.com\/v1\/oauth2\/token"
}
************************************************
************************************************
2024-06-13 08:25:24: () validateCredentials: Checking ().
TokenCache::clear, clearing cached token.
The curlPost (v1/oauth2/token) request was unsuccessful.
{
"errNum": 401,
"errMsg": "An expired-token error was received.",
"curlErrno": 0,
"name": "n\/a",
"message": "n\/a",
"details": "n\/a",
"debug_id": "n\/a"
}
CURL Options: {
"78": 10,
"52": false,
"75": true,
"74": true,
"42": 0,
"19913": true,
"13": 45,
"47": true,
"10002": "https:\/\/api-m.paypal.com\/v1\/oauth2\/token"
}
************************************************