Zen Follower
- Join Date:
- May 2010
- Posts:
- 145
- Plugin Contributions:
- 0
PayPal RESTful API Payment Module
lat9:
Because that resulted in a PHP Fatal Error, i.e. a Server 500 error.
Okay...so how do I FIX it so it works?
Views: 84,740
Zen Follower
lat9:
Because that resulted in a PHP Fatal Error, i.e. a Server 500 error.
Okay...so how do I FIX it so it works?
Zen Follower
DragonLady:
Okay...so how do I FIX it so it works?
Your best bet is to set paypal express to retired. Or remove it if you don't need access for old orders.
2 + 2 = 5 for extremely large values of 2
Pez Collectors Store •••••••• My Plugins List
Zen Follower
gothstone:
Your best bet is to set paypal express to retired. Or remove it if you don't need access for old orders.
I want to USE it.
Is it somehow out of date or is there a later module that is better somehow? I just downloaded the plugin as it is up-to-date with the latest version of Zen Cart and I'm trying to set it up as (currently) my only payment method. I'm under the impression the built-in PayPal modules are older, as I think they were around when I was using ZC ten years ago.
Administrator
DragonLady:
I want to USE it.
Is it somehow out of date or is there a later module that is better somehow? I just downloaded the plugin as it is up-to-date with the latest version of Zen Cart and I'm trying to set it up as (currently) my only payment method. I'm under the impression the built-in PayPal modules are older, as I think they were around when I was using ZC ten years ago.
@gothstone was referring to PayPal Express Checkout (paypalwpp).
New Zenner
lat9:
I've successfully used live credentials on a localhost test environment.
Try turning on the module's debug configuration setting. That will create a trace-log in the site's /logs directory that might have additional information.
It appears to be that SSL needs to be in place:
2024-08-11 01:33:56: () validateCredentials: Checking ().handleCurlError for curlPost (v1/oauth2/token) : CURL error ({
"errNum": -2,
"errMsg": "SSL certificate problem: unable to get local issuer certificate",
Administrator
mikecnz:
It appears to be that SSL needs to be in place:
2024-08-11 01:33:56: () validateCredentials: Checking ().handleCurlError for curlPost (v1/oauth2/token) : CURL error ({
"errNum": -2,
"errMsg": "SSL certificate problem: unable to get local issuer certificate",
I'd forgotten about that restriction and have updated the payment-module's wiki to identify the requirement: https://github.com/lat9/paypalr/wiki/Frequently-Asked-Questions
Zen Follower
lat9:
@gothstone was referring to PayPal Express Checkout (paypalwpp).
??? So am I.
I have installed the PayPal RESTful API Payment Module and am trying to make it WORK.
I think I have all the proper information filled in, I'm in sandbox mode for testing at both my site and PayPal, but it returns the error I posted before.
If anyone can help me figure out the issue so I can make it work, I would much appreciate it.
PS: "PayPal Payments Standard" doesn't work at all. When trying to configure it there's a form for a "PDT Token (Payment Data Transfer)" value which doesn't return any results when I search PayPal's business tools. So even when I turn off the PayPal Express module, I can't make the other work, and I really do want to make sure I can take PayPal payments, even if I add other payment methods in the future.
Zen Follower
The problem, I think, is that the forms on ZC do not match the API info from PayPal.
PayPal supplies a merchant ID, an 80+ character client ID and an 80+ character secret key.
The ZC forms ask for a username, password, and a signature code.
I'm not sure the information is analogous between the two. I've been assuming it is, and that the language used is the only distinction, but maybe that's not true?
Also, I can't find any place on the PayPal site to supply the IPN url information. Of course, that doesn't mean it isn't there, but I can't find it.
Zen Follower
Have you tried the built-in PayPal Express with your credentials?
roller-aus-blech.de
Selling on eBay? Use the fee calculator: https://webconcept.one/en/ebay-fee-calculator/
Administrator
DragonLady:
The problem, I think, is that the forms on ZC do not match the API info from PayPal.
PayPal supplies a merchant ID, an 80+ character client ID and an 80+ character secret key.
The ZC forms ask for a username, password, and a signature code.
I'm not sure the information is analogous between the two. I've been assuming it is, and that the language used is the only distinction, but maybe that's not true?
Also, I can't find any place on the PayPal site to supply the IPN url information. Of course, that doesn't mean it isn't there, but I can't find it.
If "ZC forms" refers to the configuration information for the payment module, I can confirm that the PayPal Checkout (RESTful) module requests Client ID (live) and Client Secret (live) values.
I've got no clue where you are seeing username/password/signature code entries. Clue found: You're editing the PayPal Express Checkout module's settings.
Zen Follower
Shop Suey:
Have you tried the built-in PayPal Express with your credentials?
? I only have ONE?
My options are:
PayPal Payments Standard
PayPal Payments Pro
PayPal Express Checkout
I cannot use the standard version because its asking for a PDT Token which I can't seem to find on PayPal anywhere.
I cannot use PayPal Payments Pro until I get Express checkout working. It also requires curl over SSL, which I may have but will have to ask my hosting company.
Mayhaps I haven't installed something correctly?
Administrator
DragonLady:
? I only have ONE?
My options are:
PayPal Payments Standard
PayPal Payments Pro
PayPal Express CheckoutI cannot use the standard version because its asking for a PDT Token which I can't seem to find on PayPal anywhere.
I cannot use PayPal Payments Pro until I get Express checkout working. It also requires curl over SSL, which I may have but will have to ask my hosting company.Mayhaps I haven't installed something correctly?
Right, if PayPal Checkout (RESTful) doesn't display, then you haven't installed the payment module's files.
Zen Follower
lat9:
Right, if PayPal Checkout (RESTful) doesn't display, then you haven't installed the payment module's files.
Well, now, I'll bet that's the source of the problems. :D
I'll backup my files and re-install. I'll be back to let ya know how it goes. :)
Thank-you!!!
Administrator
DragonLady:
Well, now, I'll bet that's the source of the problems. :D
I'll backup my files and re-install. I'll be back to let ya know how it goes. :)
Thank-you!!!
You're very welcome.
Zen Follower
lat9:
You're very welcome.
Okay; re-installed it. Apparently I put some files in the wrong folder, which I've noticed causing problems before. ;)
Anyway, module seems to work on the admin side, but no PayPal button shows up on the storefront checkout page.
There were error codes when I first installed it but I deleted them because I had so many from before...now I'm regretting that because it isn't displaying any new ones.
(sigh)
I'm pretty sure I do have everything uploaded correctly, so any clues what else may be going on now?
Zen Follower
DragonLady:
Okay; re-installed it. Apparently I put some files in the wrong folder, which I've noticed causing problems before. ;)
(snip)
I'm pretty sure I do have everything uploaded correctly, so any clues what else may be going on now?
Also: I'm using ZC version 2.0.1 so I don't think module is disabling itself.
Zen Follower
Okay, I made a fake account and used the checkout now button to buy an imaginary item in sandbox mode, but got the following errors:
First, I was sent to https://alchemycabinet.com/index.php?main_page=checkout_payment with the message "this page isn't working right now".
The admin error log messages are:
[11-Aug-2024 17:05:26 UTC] Request URI: /index.php?main_page=checkout_payment, IP address: 207.173.41.241
--> PHP Fatal error: Uncaught TypeError: CouponValidation::is_product_valid(): Argument #2 ($coupon_id) must be of type int, string given, called in /includes/functions/functions_gvcoupons.php on line 90 and defined in /includes/classes/CouponValidation.php:14
Stack trace:
#0 /includes/functions/functions_gvcoupons.php(90): CouponValidation::is_product_valid(4, '')
#1 /includes/modules/order_total/ot_coupon.php(635): is_product_valid(4, '')
#2 /includes/modules/order_total/ot_coupon.php(138): ot_coupon->get_order_total('')
#3 /includes/classes/order_total.php(197): ot_coupon->process()
#4 /includes/modules/pages/checkout_payment/header_php.php(101): order_total->pre_confirmation_check()
#5 /index.php(35): require('/home/alchem44/...')
#6 {main}
thrown in /includes/classes/CouponValidation.php on line 14.
[11-Aug-2024 17:05:26 UTC] Request URI: /index.php?main_page=checkout_payment, IP address: 207.173.41.241
--> PHP Fatal error: Uncaught TypeError: CouponValidation::is_product_valid(): Argument #2 ($coupon_id) must be of type int, string given, called in /includes/functions/functions_gvcoupons.php on line 90 and defined in /includes/classes/CouponValidation.php:14
Stack trace:
#0 /includes/functions/functions_gvcoupons.php(90): CouponValidation::is_product_valid(4, '')
#1 /includes/modules/order_total/ot_coupon.php(635): is_product_valid(4, '')
#2 /includes/modules/order_total/ot_coupon.php(138): ot_coupon->get_order_total('')
#3 /includes/classes/order_total.php(197): ot_coupon->process()
#4 /includes/modules/pages/checkout_payment/header_php.php(101): order_total->pre_confirmation_check()
#5 /index.php(35): require('/home/alchem44/...')
#6 {main}
thrown in /includes/classes/CouponValidation.php on line 14.
Which...seem a lot like the original messages I was getting trying to use the PayPal Express module I had installed before?
Administrator
DragonLady:
Okay, I made a fake account and used the checkout now button to buy an imaginary item in sandbox mode, but got the following errors:
First, I was sent to https://alchemycabinet.com/index.php?main_page=checkout_payment with the message "this page isn't working right now".
The admin error log messages are:
[11-Aug-2024 17:05:26 UTC] Request URI: /index.php?main_page=checkout_payment, IP address: 207.173.41.241
--> PHP Fatal error: Uncaught TypeError: CouponValidation::is_product_valid(): Argument #2 ($coupon_id) must be of type int, string given, called in /includes/functions/functions_gvcoupons.php on line 90 and defined in /includes/classes/CouponValidation.php:14
Stack trace:
#0 /includes/functions/functions_gvcoupons.php(90): CouponValidation::is_product_valid(4, '')
#1 /includes/modules/order_total/ot_coupon.php(635): is_product_valid(4, '')
#2 /includes/modules/order_total/ot_coupon.php(138): ot_coupon->get_order_total('')
#3 /includes/classes/order_total.php(197): ot_coupon->process()
#4 /includes/modules/pages/checkout_payment/header_php.php(101): order_total->pre_confirmation_check()
#5 /index.php(35): require('/home/alchem44/...')
#6 {main}
thrown in /includes/classes/CouponValidation.php on line 14.[11-Aug-2024 17:05:26 UTC] Request URI: /index.php?main_page=checkout_payment, IP address: 207.173.41.241
--> PHP Fatal error: Uncaught TypeError: CouponValidation::is_product_valid(): Argument #2 ($coupon_id) must be of type int, string given, called in /includes/functions/functions_gvcoupons.php on line 90 and defined in /includes/classes/CouponValidation.php:14
Stack trace:
#0 /includes/functions/functions_gvcoupons.php(90): CouponValidation::is_product_valid(4, '')
#1 /includes/modules/order_total/ot_coupon.php(635): is_product_valid(4, '')
#2 /includes/modules/order_total/ot_coupon.php(138): ot_coupon->get_order_total('')
#3 /includes/classes/order_total.php(197): ot_coupon->process()
#4 /includes/modules/pages/checkout_payment/header_php.php(101): order_total->pre_confirmation_check()
#5 /index.php(35): require('/home/alchem44/...')
#6 {main}
thrown in /includes/classes/CouponValidation.php on line 14.Which...seem a lot like the original messages I was getting trying to use the PayPal Express module I had installed before?
This needs to be reported as a base Zen Cart bug; not associated with this payment module.
Update: Those line numbers don't line up with the zc201 version of the /includes/modules/order_totals/ot_coupon.php file; I'll suggest you re-compare your installation to the files provided in the base zip-file.
Zen Follower
This is a fresh install, so it should all match. Nevertheless, I'll find that file and see if I can find any differences. I have installed several add-ons, and I can't be sure one of them didn't overwrite that.
Zen Follower
Ugh.
Comparing using online tool there are a bunch of differences. :(
I'll have to make a plan....
Thank-you very much for all your help so far. :)
Tell staff why this post should be reviewed.