Forums / PayPal RESTful support / PayPal RESTful API Payment Module

PayPal RESTful API Payment Module

Views: 84,740

Results 161 to 180 of 491
11 Aug 2024, 9:31 PM
#161
dragonlady avatar

dragonlady

Zen Follower

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

PayPal RESTful API Payment Module

I'm a glutton for punishment, it seems.

I made a new folder and a new database and installed ZC 2.0.1 from scratch to get a testing arena.
Once it was up and running, I installed "PayPal RESTful API Payment Module" as the very first (so far only) plugin, and so far, it works. :D

It is a little weird to me, as I get TWO PayPal buttons on checkout step 2. One sems "express" and opens a PayPal window, the other takes me to the checkout confirmation page. I would prefer to only show the first one.

I do intend to install one page checkout, but its a low priority right now as I have other stuff that's more important.

I'll put in the other addons over time and see if I can figure out which one is causing the problems with the cart I intend to use live. Now we know it IS an add-on, so that is a huge step in the right direction.

Thanks for all your help here...I'll continue to post if I discover anything that might be useful or if I need more help. :)

ETA: Ah...the second PayPal button was from the pre-installed PayPal module. I removed it, and now only have the "express" button showing. :)

11 Aug 2024, 10:41 PM
#162
dragonlady avatar

dragonlady

Zen Follower

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

Re: PayPal RESTful API Payment Module

The "optional core overrides" of the "edit orders 4.71" breaks the cart, at least with respect to this PayPal module, leading to a page that says the site can't handle the request.

It worked okay before I uploaded the optional core overrides, so I'll be reverting those back right away!

12 Aug 2024, 12:09 AM
#163
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 "optional core overrides" of the "edit orders 4.71" breaks the cart, at least with respect to this PayPal module, leading to a page that says the site can't handle the request.

It worked okay before I uploaded the optional core overrides, so I'll be reverting those back right away!
That's a post for the Edit Orders support-thread, along with a full copy of the generated log.

12 Aug 2024, 2:47 AM
#164
dragonlady avatar

dragonlady

Zen Follower

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

Re: PayPal RESTful API Payment Module

lat9:

That's a post for the Edit Orders support-thread, along with a full copy of the generated log.

Thanks!

14 Aug 2024, 5:53 PM
#165
lat9 avatar

lat9

Administrator

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

Re: PayPal RESTful API Payment Module

v1.0.3 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 these GitHub issues:

#26: Correct undefined method sendAlertMessage; should be sendAlertEmail.
#27: ipn_main_handler call-back results in paypalr's auto-disable kicking in
#28: Ensure that the GUID is unique, preventing 'ORDER_ALREADY_AUTHORIZED' errors.
#29: MISSING_REQUIRED_PARAMETER returned when customer's first/last contains multi-byte characters

18 Aug 2024, 11:44 PM
#166
lat9 avatar

lat9

Administrator

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

Re: PayPal RESTful API Payment Module

lat9:

v1.0.3 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 these GitHub issues:

#26: Correct undefined method sendAlertMessage; should be sendAlertEmail.
#27: ipn_main_handler call-back results in paypalr's auto-disable kicking in
#28: Ensure that the GUID is unique, preventing 'ORDER_ALREADY_AUTHORIZED' errors.
#29: MISSING_REQUIRED_PARAMETER returned when customer's first/last contains multi-byte characters

Please ensure that you've got the module's Debug Mode set to **Off **if you've deployed this version! I've discovered an issue that will be corrected in the forthcoming v1.0.4.

19 Aug 2024, 12:03 PM
#167
lat9 avatar

lat9

Administrator

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

Re: PayPal RESTful API Payment Module

v1.0.4 the PayPal RESTful payment module is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2382

This version replaces the now-removed v1.0.3 and contains changes associated with these GitHub issues:

#26: Correct undefined method sendAlertMessage; should be sendAlertEmail.
#27: ipn_main_handler call-back results in paypalr's auto-disable kicking in
#28: Ensure that the GUID is unique, preventing 'ORDER_ALREADY_AUTHORIZED' errors.
#29: MISSING_REQUIRED_PARAMETER returned when customer's first/last contains multi-byte characters
#32: Use 'fit-content' for credit-card selection's icon-list.
#34: Correcting admin logs when no record exists in the paypal table for the selected order.
#35: Use $template class to locate .css overrides instead of direct-directory checks.
#36: Payment-module constructor was running storefront-only code in admin, resulting in unwanted logs.
#37: Restore use of Logger::logJSON sanitization.

18 Sep 2024, 11:51 PM
#168
jeff_mash avatar

jeff_mash

Totally Zenned

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

Re: PayPal RESTful API Payment Module

Cindy - I have the latest version of the module, but how do we see what the AVS response is for a credit card? This is really important because we get a lot of fraudulent users who we don't ship orders if the AVS doesn't return with a 'Y'.

So we have the module on AUTHORIZE only so that we can check the AVS and capture the funds after our background checks.

Am I missing something, or is there a way to check where the AVS response is? I looked in the order (by clicking the 'click for Additional Payment Handling Options' link, and then looking at the DETAILS button). I also looked under the Paypal transaction in our account but they aren't showing the AVS.

EDIT: IN THE MEANTIME, is that information recorded in the debug log files for me to check, in case it's not yet in the code somewhere?

  • Jeff
19 Sep 2024, 12:08 AM
#169
lat9 avatar

lat9

Administrator

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

Re: PayPal RESTful API Payment Module

Jeff_Mash:

Cindy - I have the latest version of the module, but how do we see what the AVS response is for a credit card? This is really important because we get a lot of fraudulent users who we don't ship orders if the AVS doesn't return with a 'Y'.

So we have the module on AUTHORIZE only so that we can check the AVS and capture the funds after our background checks.

Am I missing something, or is there a way to check where the AVS response is? I looked in the order (by clicking the 'click for Additional Payment Handling Options' link, and then looking at the DETAILS button). I also looked under the Paypal transaction in our account but they aren't showing the AVS.

EDIT: IN THE MEANTIME, is that information recorded in the debug log files for me to check, in case it's not yet in the code somewhere?
I'll get this into the payment module "soon", as identified in this GitHub issue: https://github.com/lat9/paypalr/issues/24

In the meantime (!), if you've got the payment module's logging enabled, I'm pretty sure (keywords) that the information is sent back by PayPal.

20 Sep 2024, 4:35 PM
#170
jeff_mash avatar

jeff_mash

Totally Zenned

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

Re: PayPal RESTful API Payment Module

I just got this email from PayPal:

Please check your server that handles PayPal Instant Payment Notifications (IPN). IPNs sent to the following URL(s) are failing:

https://www.mydomain.com/store/ipn_main_handler.php

When I look at the logs, I see this error:

[20-Sep-2024 09:07:50 America/Los_Angeles] Request URI: /store/ipn_main_handler.php, IP address: 173.0.81.140, Language id 1
#0 /home/domain/public_html/store/includes/modules/payment/paypal/paypal_functions.php(367): zen_debug_error_handler()
#1 /home/domain/public_html/store/ipn_main_handler.php(446): ipn_create_order_update_array()
--> PHP Warning: Undefined array key "pending_reason" in /home/domain/public_html/store/includes/modules/payment/paypal/paypal_functions.php on line 367.

[20-Sep-2024 09:07:50 America/Los_Angeles] Request URI: /store/ipn_main_handler.php, IP address: 173.0.81.140
--> PHP Fatal error: Uncaught Error: Undefined constant "MODULE_PAYMENT_PAYPAL_ORDER_STATUS_ID" in /home/domain/public_html/store/ipn_main_handler.php:475
Stack trace:
#0 {main}
  thrown in /home/domain/public_html/store/ipn_main_handler.php on line 475.

Seems like it could be related. I don't think our server went down or anything, so could this be something else?

  • Jeff
20 Sep 2024, 4:42 PM
#171
lat9 avatar

lat9

Administrator

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

Re: PayPal RESTful API Payment Module

Jeff_Mash:

I just got this email from PayPal:

Please check your server that handles PayPal Instant Payment Notifications (IPN). IPNs sent to the following URL(s) are failing:

https://www.mydomain.com/store/ipn_main_handler.php

> 
> When I look at the logs, I see this error:
> 
> ```
[20-Sep-2024 09:07:50 America/Los_Angeles] Request URI: /store/ipn_main_handler.php, IP address: 173.0.81.140, Language id 1
#0 /home/domain/public_html/store/includes/modules/payment/paypal/paypal_functions.php(367): zen_debug_error_handler()
#1 /home/domain/public_html/store/ipn_main_handler.php(446): ipn_create_order_update_array()
--> PHP Warning: Undefined array key "pending_reason" in /home/domain/public_html/store/includes/modules/payment/paypal/paypal_functions.php on line 367.

[20-Sep-2024 09:07:50 America/Los_Angeles] Request URI: /store/ipn_main_handler.php, IP address: 173.0.81.140
--> PHP Fatal error: Uncaught Error: Undefined constant "MODULE_PAYMENT_PAYPAL_ORDER_STATUS_ID" in /home/domain/public_html/store/ipn_main_handler.php:475
Stack trace:
#0 {main}
  thrown in /home/domain/public_html/store/ipn_main_handler.php on line 475.

Seems like it could be related. I don't think our server went down or anything, so could this be something else?
Correction provided in Zen Cart 2.0.0 via this PR: https://github.com/zencart/zencart/pull/6316

25 Sep 2024, 1:36 PM
#172
apollowilcox avatar

apollowilcox

Zen Follower

Join Date:
Sep 2014
Location:
Indiana
Posts:
123
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

Good morning. Hoping for some help.

Paypal Restful 1.0.4 stopped working for us on 9/17. No changes had been made to any files. Upgrade to 1.0.4 in August had been working fine. I checked/ re-installed all files and re-checked all steps. Everything looks fine.

Checkout seems to all work, but customer gets error message saying, "unable to process Paypal at this time."

ZC 1.5.8a; Paypal 1.0.4

Turned on error logging and tried it myself:

Logfile includes:
Line 134: The curlPost (v2/checkout/orders) request was successful (200).
Line 242: The curlPost (v2/checkout/orders/6NH65985XU492371R/confirm-payment-source) request was successful (200).
Line 334: The curlGet (v2/checkout/orders/6NH65985XU492371R) request was successful (200).
Line 457: 2024-09-25 09:17:01: (index) Order's status set to APPROVED; posting back to checkout_one_confirmation.
Line 473: 2024-09-25 09:17:01: (checkout_one_confirmation) pre_confirmation_check, completed for payment-source paypal.
Lines: 484-493:
TokenCache::get, using saved access-token; expires in 31559 seconds.
handleCurlError for curlPost (v2/checkout/orders/6NH65985XU492371R/authorize) : CURL error ({
"errNum": -2,
"errMsg": "Operation timed out after 45002 milliseconds with 0 bytes received",
"curlErrno": 28,
"name": "n/a",
"message": "n/a",
"details": "n/a",
"debug_id": "n/a"
}
Line 506: 2024-09-25 09:17:46: (checkout_process) ==> End authorizeOrderWe are unable to process your PayPal Checkout payment at this time. Please contact us for assistance.

From my standpoint as the customer, everything looked fine: logged into Paypal, selected payment method, clicked confirm.

Any hints as to what needs to be done?

Thank you.

25 Sep 2024, 3:20 PM
#173
lat9 avatar

lat9

Administrator

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

Re: PayPal RESTful API Payment Module

apollowilcox:

Good morning. Hoping for some help.

Paypal Restful 1.0.4 stopped working for us on 9/17. No changes had been made to any files. Upgrade to 1.0.4 in August had been working fine. I checked/ re-installed all files and re-checked all steps. Everything looks fine.

Checkout seems to all work, but customer gets error message saying, "unable to process Paypal at this time."

ZC 1.5.8a; Paypal 1.0.4

Turned on error logging and tried it myself:

Logfile includes:
Line 134: The curlPost (v2/checkout/orders) request was successful (200).
Line 242: The curlPost (v2/checkout/orders/6NH65985XU492371R/confirm-payment-source) request was successful (200).
Line 334: The curlGet (v2/checkout/orders/6NH65985XU492371R) request was successful (200).
Line 457: 2024-09-25 09:17:01: (index) Order's status set to APPROVED; posting back to checkout_one_confirmation.
Line 473: 2024-09-25 09:17:01: (checkout_one_confirmation) pre_confirmation_check, completed for payment-source paypal.
Lines: 484-493:
TokenCache::get, using saved access-token; expires in 31559 seconds.
handleCurlError for curlPost (v2/checkout/orders/6NH65985XU492371R/authorize) : CURL error ({
"errNum": -2,
"errMsg": "Operation timed out after 45002 milliseconds with 0 bytes received",
"curlErrno": 28,
"name": "n/a",
"message": "n/a",
"details": "n/a",
"debug_id": "n/a"
}
Line 506: 2024-09-25 09:17:46: (checkout_process) ==> End authorizeOrderWe are unable to process your PayPal Checkout payment at this time. Please contact us for assistance.

From my standpoint as the customer, everything looked fine: logged into Paypal, selected payment method, clicked confirm.

Any hints as to what needs to be done?

Thank you.
Sounds like your webhost might have changed something.

25 Sep 2024, 11:01 PM
#174
jeff_mash avatar

jeff_mash

Totally Zenned

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

Re: PayPal RESTful API Payment Module

Deleting original post. We had accidentally clicked on the EDIT order button which caused the error in question. Doesn't seem related to the PayPal Restful module.

  • Jeff
12 Oct 2024, 3:00 PM
#175
helenewallis avatar

helenewallis

Totally Zenned

Join Date:
Jun 2016
Location:
Suffolk VA
Posts:
625
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

I posted elsewhere about this same warning from Paypal, and only then saw the reference to this thread. I see that it is valid for 1.58. Can anyone confirm that it will work with 1.57 as well?

12 Oct 2024, 3:34 PM
#176
lat9 avatar

lat9

Administrator

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

Re: PayPal RESTful API Payment Module

HeleneWallis:

I posted elsewhere about this same warning from Paypal, and only then saw the reference to this thread. I see that it is valid for 1.58. Can anyone confirm that it will work with 1.57 as well?
If "it" is the PayPal RESTful payment module, the answer is "No"; the module requires Zen Carts 1.5.8a or later.

12 Oct 2024, 9:49 PM
#177
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,720
Plugin Contributions:
56

Re: PayPal RESTful API Payment Module

The module discussed in this thread is different from the built-in PayPal modules in Zen Cart.

See https://docs.zen-cart.com/user/payment/paypal_overview/ for details.

That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.

2 Dec 2024, 9:08 PM
#178
dbltoe avatar

dbltoe

Totally Zenned

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

Re: PayPal RESTful API Payment Module

Is it just me or is the following backwards?
[Attachment no longer available]
If I select True, everyone can use CC from PayPal.

If I select False, only registered customers can use CC from PayPal.

Ther wording seems to be correct, but the action when selecting True or False seems to be reversed.

:huh:

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

2 Dec 2024, 10:05 PM
#179
lat9 avatar

lat9

Administrator

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

Re: PayPal RESTful API Payment Module

dbltoe:

Is it just me or is the following backwards?
[Attachment no longer available]
If I select True, everyone can use CC from PayPal.

If I select False, only registered customers can use CC from PayPal.

Ther wording seems to be correct, but the action when selecting True or False seems to be reversed.

:huh:
I think it's just you.:blush:

true ... anyone checking out (guests included) can use credit cards
false ... no one can use credit cards
Account-Holders Only ... anyone with an account can use credit cards, i.e. guest customers cannot.

3 Dec 2024, 4:30 AM
#180
dbltoe avatar

dbltoe

Totally Zenned

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

Re: PayPal RESTful API Payment Module

Do you consider the same results if you slightly modify what is being stated?

Essentially, it is say do you want to limit and the default is no. (false)

However, selecting that I do want to limit, gives access to all.

Perhaps "If you are using One Page Checkout, you can limit credit card payments. Who can access your store's credit card processing? Default Everyone.

Everyone

No One

Account Holders Only

That covers all the bases although I can't think of a scenario where a business would want to deny CC processing completely unless they're a street-corner, cash-only business.:P

I'm probably number 1189 on the top ten list of PHP knowledge but I do have an extensive English background with three English majors in the family. They all guessed that the selection of false let everyone process. All based on the emphasis on limit.

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