Forums / PayPal RESTful support / PayPal RESTful API Payment Module

PayPal RESTful API Payment Module

Views: 84,746

Results 241 to 260 of 491
19 Feb 2025, 3:01 PM
#241
lat9 avatar

lat9

Administrator

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

PayPal RESTful API Payment Module

balihr:

OK, so... If my understanding is correct, there's no 3DS with this module? I'm looking at the API docs and it looks like SCA_ALWAYS means 3DS is always triggered, but then irrelevant of the response, this module lets the transaction through?

Could you point me in the right direction as to where to place the code to check their 3DS response and either proceed or decline the transaction based on 3DS response?
There is 3DS support. PayPal will send a 3DS request if it warrants it. That comes back through the webhook in the root.

See this PayPal testing documentation for details: https://developer.paypal.com/api/rest/sandbox/card-testing/

19 Feb 2025, 5:42 PM
#242
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

Cindy - Something appears to be happening right now, and I'm not sure if anyone else is experiencing this. 1.5.8a running the 1.0.5 version of the module.

I just noticed between last night and today that the module is disabled (after working fine).

I just enabled it again, and moved a pending (authorized only) order to a new ZenCart status (processing), and the module disabled again.

It gave this message: " The live credentials for the paypalr payment module are invalid. The payment module has been automatically disabled."

I logged into PayPal's Developer Portal and noticed that the setting was on Sandbox instead of LIVE (we didn't change this, so I don't know why it was on Sandbox mode).

I put it back to live mode, and made sure the credentials were correct in the module. But it keeps disabling. HELP!

EDIT - When I look in PayPal and edit the credentials to see the details, I see this:

Attachment 20912

Could that be the issue, and what would cause that?

  • Jeff
19 Feb 2025, 5:59 PM
#243
barco57 avatar

barco57

Totally Zenned

Join Date:
Apr 2006
Location:
West Salem, IL
Posts:
2,845
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

Please use the curl tester at YOURDOMAIN.COM/extras/curltester.php to test over and over again to see if you get intermittent result on connection for "PayPal Express/Pro Server" and the "PayPal Express/Pro Sandbox"

Mike
AEIIA - Zen Cart Certified & PCI Compliant Hosting
The Zen Cart Forum...Better than a monitor covered with post-it notes!

19 Feb 2025, 6:22 PM
#244
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

barco57:

Please use the curl tester at YOURDOMAIN.COM/extras/curltester.php to test over and over again to see if you get intermittent result on connection for "PayPal Express/Pro Server" and the "PayPal Express/Pro Sandbox"

It appears to be failing in some areas....see screenshot.

Attachment 20917

  • Jeff
19 Feb 2025, 9:15 PM
#245
balihr avatar

balihr

Totally Zenned

Join Date:
Oct 2008
Location:
Croatia
Posts:
1,805
Plugin Contributions:
22

Re: PayPal RESTful API Payment Module

lat9:

There is 3DS support. PayPal will send a 3DS request if it warrants it. That comes back through the webhook in the root.

See this PayPal testing documentation for details: https://developer.paypal.com/api/rest/sandbox/card-testing/

Thanks Cindy. I've spent all day trying to get this to work, but whatever I do, PayPal always responds with 3ds_return, even when I cancel the transaction during 3DS verification. I give up in hope someone smarter than me (it's not like I've set the bar high...) sorts it out in the future.

Based on what I can tell, 3DS is there, but not working. Since the module isn't checking for the 3DS response nor the EnrollmentStatus, Authentication_Status and LiabilityShift parameters at all, all transactions are authorized by default (speaking of 3DS only), meaning all liability falls down to the merchant. Please correct me if I'm wrong.

My site - Pro ZC Help
My portfolio | My plugins

20 Feb 2025, 1:30 AM
#246
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

In case anyone else is having CURL Connection Issues to the PayPal REST server.......

The issue in our case was that the FIREWALL was blocking a list of countries that are high risk for hacking, fraud, and malicious behavior. It turns out that RUSSIA being in the CC_DENY list for our firewall was the issue.

Why? No idea. Russia (RU) has been in our ban list for over a year with no issue. But suddenly, as of February 19th, 2025, it appears that there is some kind of relationship between Paypal REST servers and Russia.

When we REMOVED the "RU" country from CC_DENY on our firewall, wallah! We could connect to the PayPal REST server. When we put RU back on the list, the connection couldn't be made.

Hopefully that can help someone else out there. Thanks to Cindy for helping to rule out all the other issues we thought it could be. <3

  • Jeff
20 Feb 2025, 2:43 AM
#247
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: PayPal RESTful API Payment Module

There are reports from several merchants that the intermittent issue happening earlier today and yesterday may be resolved.

Hopefully it has indeed been fixed. My last interaction with PayPal about it indicated that it was being escalated to a senior engineer to investigate.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

8 Mar 2025, 2:33 PM
#248
lat9 avatar

lat9

Administrator

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

Re: PayPal RESTful API Payment Module

v1.1.0 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:

#24: Display card payments' AVS/CVV status in the admin.
#48: Correct function signature.
#25: Add Auth Only (Card Only) transaction type.
#49: Add setting to enable SCA_ALWAYS on card payments and capture 3DS status from PayPal.

17 Mar 2025, 12:59 PM
#249
brittainmark avatar

brittainmark

Totally Zenned

Join Date:
Apr 2009
Posts:
509
Plugin Contributions:
1

Re: PayPal RESTful API Payment Module

Is Update from 1.0.5 just a straight overwrite of the existing files? Or do I need to uninstall and reinstall?

Mark Brittain
http:\innerlightcrystals.co.uk\sales\

17 Mar 2025, 1:03 PM
#250
brittainmark avatar

brittainmark

Totally Zenned

Join Date:
Apr 2009
Posts:
509
Plugin Contributions:
1

Re: PayPal RESTful API Payment Module

Ignore me just found the read me. Simply overwrite the existing installation. Thanks

Mark Brittain
http:\innerlightcrystals.co.uk\sales\

17 Mar 2025, 6:14 PM
#251
lsde avatar

lsde

New Zenner

Join Date:
Jul 2014
Location:
Delaware USA
Posts:
26
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

zc 1.58a
php 7.4
opc 2.5.1
paypal RESTful 1.1.0

Received error log below after installing and testing paypal RESTful. We had a nearly identical error on a test site with zc 2.1.0 and php 8.1 using a database only upgrade from a copy of the 158a database. Maybe a database issue?

[16-Mar-2025 17:32:48 UTC] Request URI: /index.php?main_page=checkout_process, IP address: 71.200.5.177, Language id 1
#1 trigger_error() called at [/includes/classes/db/mysql/query_factory.php:703]
#2 queryFactory->show_error() called at [/includes/classes/db/mysql/query_factory.php:648]
#3 queryFactory->set_error() called at [/includes/classes/db/mysql/query_factory.php:289]
#4 queryFactory->Execute() called at [/includes/functions/database.php:133]
#5 zen_db_perform() called at [/includes/modules/payment/paypalr.php:1898]
#6 paypalr->after_order_create() called at [/includes/classes/payment.php:306]
#7 payment->after_order_create() called at [/includes/modules/checkout_process.php:103]
#8 require(/includes/modules/checkout_process.php) called at [/includes/modules/pages/checkout_process/header_php.php:13]
#9 require(/includes/modules/pages/checkout_process/header_php.php) called at [/index.php:35]
--> PHP Fatal error: MySQL error 1364: Field 'business' doesn't have a default value :: INSERT INTO paypal (order_id, txn_type, module_name, module_mode, reason_code, payment_type, payment_status, invoice, mc_currency, first_name, last_name, payer_email, payer_id, payer_status, receiver_email, receiver_id, txn_id, num_cart_items, mc_gross, date_added, last_modified, notify_version, expiration_time, memo, address_name, address_street, address_city, address_state, address_zip, address_country, payment_date, payment_gross, payment_fee, settle_amount, settle_currency, exchange_rate) VALUES ('9956', 'CREATE', 'paypalr', 'CAPTURE', '', 'paypal', 'CAPTURED', xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
17:32:47', '14.84', '1.01', '13.83', 'USD', null) ==> (as called by) /includes/functions/database.php on line 133 <== in /includes/classes/db/mysql/query_factory.php on line 703.

Any help would be appreciated.
Thanks

17 Mar 2025, 9:30 PM
#252
lat9 avatar

lat9

Administrator

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

Re: PayPal RESTful API Payment Module

lsde:

zc 1.58a
php 7.4
opc 2.5.1
paypal RESTful 1.1.0

Received error log below after installing and testing paypal RESTful. We had a nearly identical error on a test site with zc 2.1.0 and php 8.1 using a database only upgrade from a copy of the 158a database. Maybe a database issue?

[16-Mar-2025 17:32:48 UTC] Request URI: /index.php?main_page=checkout_process, IP address: 71.200.5.177, Language id 1
#1 trigger_error() called at [/includes/classes/db/mysql/query_factory.php:703]
#2 queryFactory->show_error() called at [/includes/classes/db/mysql/query_factory.php:648]
#3 queryFactory->set_error() called at [/includes/classes/db/mysql/query_factory.php:289]
#4 queryFactory->Execute() called at [/includes/functions/database.php:133]
#5 zen_db_perform() called at [/includes/modules/payment/paypalr.php:1898]
#6 paypalr->after_order_create() called at [/includes/classes/payment.php:306]
#7 payment->after_order_create() called at [/includes/modules/checkout_process.php:103]
#8 require(/includes/modules/checkout_process.php) called at [/includes/modules/pages/checkout_process/header_php.php:13]
#9 require(/includes/modules/pages/checkout_process/header_php.php) called at [/index.php:35]
--> PHP Fatal error: MySQL error 1364: Field 'business' doesn't have a default value :: INSERT INTO paypal (order_id, txn_type, module_name, module_mode, reason_code, payment_type, payment_status, invoice, mc_currency, first_name, last_name, payer_email, payer_id, payer_status, receiver_email, receiver_id, txn_id, num_cart_items, mc_gross, date_added, last_modified, notify_version, expiration_time, memo, address_name, address_street, address_city, address_state, address_zip, address_country, payment_date, payment_gross, payment_fee, settle_amount, settle_currency, exchange_rate) VALUES ('9956', 'CREATE', 'paypalr', 'CAPTURE', '', 'paypal', 'CAPTURED', xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
17:32:47', '14.84', '1.01', '13.83', 'USD', null) ==> (as called by) /includes/functions/database.php on line 133 <== in /includes/classes/db/mysql/query_factory.php on line 703.

Any help would be appreciated.
Thanks
I don't know the history of your site, but for a zc158a (and later) site's paypal table, the business field is defined as

varchar(128) NOT NULL default ''

Updating your database to use the expected 'schema' for that table's field will correct the issue that you've posted.

19 Apr 2025, 5:36 PM
#253
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,849
Plugin Contributions:
18

Re: PayPal RESTful API Payment Module

Upgrade from 1.5.7 to latest github
PHP 8.3
OPC
PayPal RESTful
USPS RESTful
EO
OPC

Accept Credit Cards set to Yes

Users are getting an error message stating the CC must be at leastr 18 characters. Adding dashes to the CC# stops that, but then the process fails as expected.

Set the debug on an got nothing but a series of ```
() validateCredentials: Checking ().The curlPost (v1/oauth2/token) request was successful (200).

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

20 Apr 2025, 1:33 AM
#254
g2ktcf avatar

g2ktcf

Totally Zenned

Join Date:
Feb 2011
Location:
Lumberton, TX
Posts:
636
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

ON my checkout page, The CC icons spill out of the frame with Discover overlapping the next payment option. I tried uploading a screen shot but got "you have exceeded your limit". wlcartistry.com is the live site. This issue sounds familiar but I could not find anything by searching this thread.

ZC 2.0.1
OPC
Paypal Restful
Zelle
IH
Bootstrap
Clone a Template
Edit Orders
DBIO

20 Apr 2025, 7:48 AM
#255
simon1066 avatar

simon1066

Totally Zenned

Join Date:
Feb 2009
Location:
UK
Posts:
1,326
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

g2ktcf:

ON my checkout page, The CC icons spill out of the frame with Discover overlapping the next payment option. I tried uploading a screen shot but got "you have exceeded your limit". wlcartistry.com is the live site. This issue sounds familiar but I could not find anything by searching this thread.

ZC 2.0.1
OPC
Paypal Restful
Zelle
IH
Bootstrap
Clone a Template
Edit Orders
DBIO

Attachment 20950

You would just need to increase the width of the div that contains the icons. I'm not familiar with the Bootstrap template but the code you are looking for is

.ppr-button-choice label {
  cursor: pointer;
  height: 4rem;
  font-weight: bold;
  width: 11rem;
  display: inline-block;
  text-align: center;
}

Increasing the width to say 14rem should do it

Attachment 20951

That css code is shown as being inline so I'm not sure where it's located, perhaps in some javascript. The simplest way (perhaps the best?) is to add this to the end of your stylesheet.css

.ppr-button-choice label {
  width: 14rem!important;
}

Simon

20 Apr 2025, 11:33 AM
#256
g2ktcf avatar

g2ktcf

Totally Zenned

Join Date:
Feb 2011
Location:
Lumberton, TX
Posts:
636
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

That did it. Added that last bit to /includes/templates/WLC_Bootstrap/css/site_specific_styles.php.

Thank You!

20 Apr 2025, 12:26 PM
#257
lat9 avatar

lat9

Administrator

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

Re: PayPal RESTful API Payment Module

dbltoe:

Upgrade from 1.5.7 to latest github
PHP 8.3
OPC
PayPal RESTful
USPS RESTful
EO
OPC

Accept Credit Cards set to Yes

Users are getting an error message stating the CC must be at leastr 18 characters. Adding dashes to the CC# stops that, but then the process fails as expected.

Set the debug on an got nothing but a series of ```
() validateCredentials: Checking ().The curlPost (v1/oauth2/token) request was successful (200).

You've apparently got ***Configuration / Minimum Values / Credit Card Number*** set to 18 (for whatever reason).
20 Apr 2025, 1:10 PM
#258
lat9 avatar

lat9

Administrator

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

Re: PayPal RESTful API Payment Module

simon1066:

Attachment 20950

You would just need to increase the width of the div that contains the icons. I'm not familiar with the Bootstrap template but the code you are looking for is

.ppr-button-choice label {
cursor: pointer;
height: 4rem;
font-weight: bold;
width: 11rem;
display: inline-block;
text-align: center;
}

> 
> Increasing the width to say 14rem should do it
> 
> Attachment 20951
> 
> That css code is shown as being inline so I'm not sure where it's located, perhaps in some javascript. The simplest way (perhaps the best?) is to add this to the end of your stylesheet.css  
> 
> ```
.ppr-button-choice label {
  width: 14rem!important;
}

g2ktcf:

That did it. Added that last bit to /includes/templates/WLC_Bootstrap/css/site_specific_styles.php.

Thank You!
Thanks to both of you! FWIW, I've captured this in one of the payment-modules "Frequently Asked Questions": https://github.com/lat9/paypalr/wiki/Frequently-Asked-Questions

20 Apr 2025, 1:15 PM
#259
g2ktcf avatar

g2ktcf

Totally Zenned

Join Date:
Feb 2011
Location:
Lumberton, TX
Posts:
636
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

I just noticed something interesting. My live store is ZC 2.0.1 and my dev site is 2.1.0.

I did NOT have the same issue in 2.1.0. Once I installed Paypal Restful, the checkout page was correct from the start.

21 Apr 2025, 4:07 PM
#260
jeff_mash avatar

jeff_mash

Totally Zenned

Join Date:
Aug 2004
Posts:
732
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

I'm just curious if anyone can reproduce this confirmed issue with PayPal Restful v1.1.0 Beta-1 with OPC v2.4.6.

In the Admin, set your transaction for AUTHORIZE (so you won't actually be charged anything).
Place an order using the GUEST checkout (for the One Page Checkout plug).  **Use a different state than the current state of your store location.**
After your order is in your system, pull up the DETAILS by clicking the "Click for Additional Payment Handling Options" link, and hit the DETAILS button.
See if the STATE being passed to PayPal is correct or not.

For me (using ZC 1.5.8a), it will ALWAYS pass "CA" to PayPal if the user is checking out as a GUEST account only.

(If they are not checking out as a guest account, then it works fine and the correct state is passed to PayPal).

I have reported this in the GitHub but figured I'd post here in case any other users may be seeing this same behavior (with it posting the wrong State only if using a GUEST checkout.

  • Jeff