Forums / PayPal RESTful support / PayPal RESTful API Payment Module

PayPal RESTful API Payment Module

Views: 84,740

Results 141 to 160 of 491
10 Aug 2024, 3:44 PM
#141
dragonlady avatar

dragonlady

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?

10 Aug 2024, 4:23 PM
#142
gothstone avatar

gothstone

Zen Follower

Join Date:
Jun 2005
Posts:
330
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

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

10 Aug 2024, 5:07 PM
#143
dragonlady avatar

dragonlady

Zen Follower

Join Date:
May 2010
Posts:
145
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

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.

10 Aug 2024, 5:23 PM
#144
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,110
Plugin Contributions:
56

Re: PayPal RESTful API Payment Module

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

11 Aug 2024, 1:36 AM
#145
mikecnz avatar

mikecnz

New Zenner

Join Date:
Mar 2009
Location:
New Zealand
Posts:
76
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

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",

11 Aug 2024, 12:58 PM
#146
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,110
Plugin Contributions:
56

Re: PayPal RESTful API Payment Module

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

11 Aug 2024, 2:03 PM
#147
dragonlady avatar

dragonlady

Zen Follower

Join Date:
May 2010
Posts:
145
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

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.

11 Aug 2024, 2:38 PM
#148
dragonlady avatar

dragonlady

Zen Follower

Join Date:
May 2010
Posts:
145
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

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.

11 Aug 2024, 2:52 PM
#149
shop_suey avatar

shop_suey

Zen Follower

Join Date:
Feb 2014
Location:
Germany
Posts:
375
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

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/

11 Aug 2024, 2:59 PM
#150
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,110
Plugin Contributions:
56

Re: PayPal RESTful API Payment Module

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.

11 Aug 2024, 3:06 PM
#151
dragonlady avatar

dragonlady

Zen Follower

Join Date:
May 2010
Posts:
145
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

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?

11 Aug 2024, 3:12 PM
#152
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,110
Plugin Contributions:
56

Re: PayPal RESTful API Payment Module

DragonLady:

? 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?
Right, if PayPal Checkout (RESTful) doesn't display, then you haven't installed the payment module's files.

11 Aug 2024, 3:47 PM
#153
dragonlady avatar

dragonlady

Zen Follower

Join Date:
May 2010
Posts:
145
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

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!!!

11 Aug 2024, 4:08 PM
#154
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,110
Plugin Contributions:
56

Re: PayPal RESTful API Payment Module

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.

11 Aug 2024, 4:44 PM
#155
dragonlady avatar

dragonlady

Zen Follower

Join Date:
May 2010
Posts:
145
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

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?

11 Aug 2024, 4:57 PM
#156
dragonlady avatar

dragonlady

Zen Follower

Join Date:
May 2010
Posts:
145
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

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.

11 Aug 2024, 5:10 PM
#157
dragonlady avatar

dragonlady

Zen Follower

Join Date:
May 2010
Posts:
145
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

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?

11 Aug 2024, 5:21 PM
#158
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,110
Plugin Contributions:
56

Re: PayPal RESTful API Payment Module

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.

11 Aug 2024, 5:52 PM
#159
dragonlady avatar

dragonlady

Zen Follower

Join Date:
May 2010
Posts:
145
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

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.

11 Aug 2024, 6:03 PM
#160
dragonlady avatar

dragonlady

Zen Follower

Join Date:
May 2010
Posts:
145
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

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. :)