Forums / PayPal RESTful support / PayPal RESTful API Payment Module

PayPal RESTful API Payment Module

Views: 84,836

Results 401 to 420 of 491
28 Feb 2026, 4:42 PM
#401
chadlly2003 avatar

chadlly2003

Totally Zenned

Join Date:
Jan 2015
Posts:
824
Plugin Contributions:
0

PayPal RESTful API Payment Module

Guess I was wrong. Got two emails from customers saying when they tried with paypal it just kept spinning.
Strange is that i did get some paypal orders go through. When I tried on firefox this morning it just kept spinning. Is there anyone else having these issue?

i removed all of this from the .htacess file

<IfModule mod_headers.c>
Header set Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://code.jquery.com https://cdn.jsdelivr.net https://cdnjs.cloudflare.com https://stackpath.bootstrapcdn.com https://www.googletagmanager.com https://www.google-analytics.com https://www.google-gtagservices.com https://www.googleadservices.com https://*.doubleclick.net https://bat.bing.com https://connect.facebook.net https://www.facebook.com https://mylivechat.com https://t2.mylivechat.com https://www.shopperapproved.com https://cdn.doofinder.com https://us1-config.doofinder.com https://maps.googleapis.com https://www.paypal.com https://www.paypalobjects.com; connect-src 'self' https://www.google-analytics.com https://www.googletagmanager.com https://analytics.google.com https://www.google.com https://cdn.jsdelivr.net https://mylivechat.com https://t2.mylivechat.com https://www.shopperapproved.com https://www.googleadservices.com https://*.doubleclick.net https://bat.bing.com https://connect.facebook.net https://www.facebook.com https://cdn.doofinder.com https://us1-api.doofinder.com wss://*.doofinder.com https://maps.googleapis.com https://www.paypal.com https://www.paypalobjects.com; img-src 'self' data: https://invertersupply.com https://www.google-analytics.com https://www.googletagmanager.com https://www.google.com https://www.googleadservices.com https://*.doubleclick.net https://bat.bing.com https://connect.facebook.net https://www.facebook.com https://www.shopperapproved.com https://mylivechat.com https://t2.mylivechat.com https://maps.gstatic.com https://www.paypalobjects.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://cdn.jsdelivr.net https://cdnjs.cloudflare.com https://cdn.doofinder.com https://t2.mylivechat.com https://code.jquery.com https://www.shopperapproved.com; style-src-elem 'self' 'unsafe-inline' https://fonts.googleapis.com https://cdn.jsdelivr.net https://cdnjs.cloudflare.com https://cdn.doofinder.com https://t2.mylivechat.com https://code.jquery.com https://www.shopperapproved.com; font-src 'self' https://fonts.gstatic.com https://cdnjs.cloudflare.com; frame-src https://www.googletagmanager.com https://www.google.com https://mylivechat.com https://t2.mylivechat.com https://www.googleadservices.com https://*.doubleclick.net https://www.facebook.com https://www.paypal.com; form-action 'self' https://www.facebook.com https://www.invertersupply.com https://www.paypal.com; frame-ancestors 'self'; upgrade-insecure-requests;"
</IfModule> 

Is there another paypal plugin I could try that's not as quirky.

I just set the paypal rest module up last week. I have been using zencart for years and never had an issue like this especially with a payment module. I may have to go back to the express checkout if I cant solve this issue.

1 Mar 2026, 5:28 PM
#402
jeff_mash avatar

jeff_mash

Totally Zenned

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

Re: PayPal RESTful API Payment Module

chadlly2003:

Is there anyone else having these issue?

Not sure if this will help isolate any issues, but have you tried the CURL tester to see what the output is?

By default, it's installed in: https://www.YOURDOMAIN.COM/extras/curltester.php

You an see if there are any errors listed there which might help pinpoint any connection issues.

(In the past, I had issues with PayPal not connecting, and it turned out that it was something in our firewall that was blocking the connection).

  • Jeff
2 Mar 2026, 6:22 PM
#403
chadlly2003 avatar

chadlly2003

Totally Zenned

Join Date:
Jan 2015
Posts:
824
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

In express paypal the old version It used to show the paypal transaction id in the email.

How would I add it into the paypalr rest file. So when an email is sent that it includes paypal transaction

2 Mar 2026, 7:41 PM
#404
chadlly2003 avatar

chadlly2003

Totally Zenned

Join Date:
Jan 2015
Posts:
824
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

chadlly2003:

In express paypal the old version It used to show the paypal transaction id in the email.

How would I add it into the paypalr rest file. So when an email is sent that it includes paypal transaction

to show the transaction id on them email
path \includes\modules\paymentpaypalr

find line 2651

   if (!empty($paypal['txn_id'])) {
                        $email_text .= "\n\n" . ' PayPal Trans ID: ' . $paypal['txn_id'];
                        $html_msg['EMAIL_PAYPAL_TRANSID'] = $paypal['txn_id'];
                    }

replace with:

// Get the PayPal transaction ID from the order info
$paypal_txn_id = !empty($this->orderInfo['payment_info']['transaction_id']) ? 
                  $this->orderInfo['payment_info']['transaction_id'] : 'N/A';

// Append to the plain text email
$email_text .= "\n\n" . 'PayPal Transaction ID: ' . $paypal_txn_id;

// Add to the HTML message
$html_msg['EMAIL_PAYPAL_TRANSID'] = $paypal_txn_id;
2 Mar 2026, 8:05 PM
#405
chadlly2003 avatar

chadlly2003

Totally Zenned

Join Date:
Jan 2015
Posts:
824
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

That did not work. hmm this module is not my friend. Ill figure it out too be continued

2 Mar 2026, 10:22 PM
#406
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,973
Plugin Contributions:
8

Re: PayPal RESTful API Payment Module

chadlly2003:

to show the transaction id on them email
path \includes\modules\paymentpaypalr

find line 2651

if (!empty($paypal['txn_id'])) {
$email_text .= "\n\n" . ' PayPal Trans ID: ' . $paypal['txn_id'];
$html_msg['EMAIL_PAYPAL_TRANSID'] = $paypal['txn_id'];
}

> 
> replace with: 
> 
> ```
// Get the PayPal transaction ID from the order info
$paypal_txn_id = !empty($this->orderInfo['payment_info']['transaction_id']) ? 
                  $this->orderInfo['payment_info']['transaction_id'] : 'N/A';

// Append to the plain text email
$email_text .= "\n\n" . 'PayPal Transaction ID: ' . $paypal_txn_id;

// Add to the HTML message
$html_msg['EMAIL_PAYPAL_TRANSID'] = $paypal_txn_id;

chad,
in looking at v1.3.0 there is no line 2651.

in addition, the correct path is:

/includes/modules/payment/paypalr.php

i think you are referring to the code in this block.

if so, that code in a vanilla version of zc v2.x.x (and probably earlier) will never get hit.

that code will only get run IF you are missing the function zen_update_orders_history. you can see that here.

so if you are running a vanilla version of ZC and want that id in your email, i would recommend using a notifier from the zen_mail method and inserting it there.

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

3 Mar 2026, 5:54 PM
#407
andy_77 avatar

andy_77

New Zenner

Join Date:
Apr 2023
Location:
UK
Posts:
64
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

Noticed that if customers use the "credit card" option with the PayPal RESTful payment module, and fill in a company name, this isn't carried through to the PayPal payment for the card payment (PayPal just shows the customers name and address). Not sure if we've missed an obvious setting somewhere, which allows the company name field to be populated with the actual payment?

3 Mar 2026, 8:47 PM
#408
chadlly2003 avatar

chadlly2003

Totally Zenned

Join Date:
Jan 2015
Posts:
824
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

carlwhat:

chad,
in looking at v1.3.0 there is no line 2651.

in addition, the correct path is:

/includes/modules/payment/paypalr.php

i think you are referring to the code in this block.

if so, that code in a vanilla version of zc v2.x.x (and probably earlier) will never get hit.

that code will only get run IF you are missing the function zen_update_orders_history. you can see that here.

so if you are running a vanilla version of ZC and want that id in your email, i would recommend using a notifier from the zen_mail method and inserting it there.

best.

Carl,

This is how i was able to put the transaction id on paypair email. What are your thoughts

path: \includes\classes\order.php
find line 1458

$html_msg['PAYMENT_METHOD_DETAIL'] = (isset($GLOBALS[$_SESSION['payment']]) && is_object($GLOBALS[$_SESSION['payment']]) ? $GLOBALS[$payment_class]->title : PAYMENT_METHOD_GV); 

add right below the above

// bof paypal transaction id
    // ----- Add PayPal Authorization ID to emails if payment method is PayPal -----
if (!empty($_SESSION['payment']) && strpos(strtolower($_SESSION['payment']), 'paypal') !== false) {
    global $db;

    // Fetch latest PayPal Authorization ID for this order
    $txn_check = $db->Execute(
        "SELECT txn_id 
         FROM paypal 
         WHERE order_id = " . (int)$zf_insert_id . " 
         ORDER BY date_added DESC 
         LIMIT 1"
    );

    $txn_id = (!$txn_check->EOF && !empty($txn_check->fields['txn_id'])) 
                ? $txn_check->fields['txn_id'] 
                : 'N/A';

    // Append to plain text email
    $email_order .= "\nPayPal Authorization ID: $txn_id\n";

    // Append to HTML email
    if (!isset($html_msg['PAYMENT_METHOD_DETAIL'])) $html_msg['PAYMENT_METHOD_DETAIL'] = '';
    $html_msg['PAYMENT_METHOD_DETAIL'] .= '<br><strong>PayPal Authorization ID: ' . htmlspecialchars($txn_id) . '</strong>';
}
// eof paypal transaction id

One question:
When a palpal order is created in the database it creates two order_id with different txn_type.

txn_type: Create
txn_type: Capture

I believe this is just the way paypalr put it into the database. Just wanted to verify

4 Mar 2026, 2:20 AM
#409
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,973
Plugin Contributions:
8

Re: PayPal RESTful API Payment Module

chad,
i really despise paypal. they screwed me over years ago so i try not to support them and everything that they do.

with regards to your question, again, you are now looking at modifying core code. so again i am not a fan.

the code seems like it might work, but i do not have any test paypal credentials.

it seems there is a notifier here:

https://github.com/zencart/zencart/blob/a255caba270e3defee99ada0d89c3b5dce7daf58/includes/classes/order.php#L1486

so i would attach there as opposed to modifying core code.

did i mention i abhor modifying core code?

did i mention i despise paypal?

on cursory look, there does seem to be different transaction ids for each transaction type. although i could be wrong.

with regards to what goes into the database, paypal does not put anything into the database. this plugin puts it into the database. i would not confuse paypal with this plugin. they are different.

best.

author of square Webpay, now with Apple Pay and Google Pay.
mXworks
donations: venmo or paypal accepted.
premium consistent excellent support. available for hire.

4 Mar 2026, 1:09 PM
#410
lat9 avatar

lat9

Administrator

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

Re: PayPal RESTful API Payment Module

Just verifying that the payment module (paypalr) creates two entries in the **paypal **database table upon order creation, one with a txn_type of CREATE and another that depends on whether the transaction was treated as a Final Sale (CAPTURE) or Authorize-Only (AUTHORIZE).

4 Mar 2026, 3:00 PM
#411
chadlly2003 avatar

chadlly2003

Totally Zenned

Join Date:
Jan 2015
Posts:
824
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

lat9:

Just verifying that the payment module (paypalr) creates two entries in the **paypal **database table upon order creation, one with a txn_type of CREATE and another that depends on whether the transaction was treated as a Final Sale (CAPTURE) or Authorize-Only (AUTHORIZE).

That is correct. Why two entries though? Almost look like a duplicate order.

4 Mar 2026, 5:09 PM
#412
lat9 avatar

lat9

Administrator

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

Re: PayPal RESTful API Payment Module

chadlly2003:

That is correct. Why two entries though? Almost look like a duplicate order.
Because the payment module logs each transaction with PayPal.

8 Mar 2026, 6:31 PM
#413
lat9 avatar

lat9

Administrator

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

Re: PayPal RESTful API Payment Module

Note, too, that there is a customer-visible order_status_history record that identifies the PayPal transaction id ... it's just not sent as part of that initial email.

9 Mar 2026, 8:03 AM
#414
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Location:
England
Posts:
733
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

Hello there,
Nothing wrong with module I Think, but just wanted advice really. Instinct say to void / cancel the order.

Got this message for first time ever via Paypal Checkout, the order with same card ending has gone through:-

A credit-card payment was attempted with a fraudulent card from IP address

It is to USA and postage is about £12 tracked for a £2.75 item. Which to me seems a little odd anyway. Though perhaps they are testing the water.

9 Mar 2026, 12:30 PM
#415
lat9 avatar

lat9

Administrator

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

Re: PayPal RESTful API Payment Module

HeathenMagic:

Hello there,
Nothing wrong with module I Think, but just wanted advice really. Instinct say to void / cancel the order.

Got this message for first time ever via Paypal Checkout, the order with same card ending has gone through:-

It is to USA and postage is about £12 tracked for a £2.75 item. Which to me seems a little odd anyway. Though perhaps they are testing the water.
That email is sent by the payment module if PayPal reports that the card is fraudulent; an email is also sent if PayPal reports the card as stolen.

It's probably safer for you to void/cancel the order since it appears that the 'customer' is testing stolen cards.

9 Mar 2026, 10:37 PM
#416
heathenmagic avatar

heathenmagic

Totally Zenned

Join Date:
May 2005
Location:
England
Posts:
733
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

lat9:

That email is sent by the payment module if PayPal reports that the card is fraudulent; an email is also sent if PayPal reports the card as stolen.

It's probably safer for you to void/cancel the order since it appears that the 'customer' is testing stolen cards.

Thanks for that. Yes kind of obvious I know, but as it was first time I saw it, wanted to double check. Will cancel it, cheaper than a possible chargeback for sure. Nice feature also!

11 Mar 2026, 1:17 PM
#417
lat9 avatar

lat9

Administrator

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

Re: PayPal RESTful API Payment Module

v1.3.1 of the 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:

#110: Auto-disable if root-directory files aren't copied; implies a root-directory file-system permissions issue.
#109: Correct Pay Later amounts and messaging.
#107: Adding the locale= parameter to the JS-SDK load, in an attempt to get PayPal language translations.
#111: Pay Later messaging not included for older templates (missing NOTIFY_HTML_HEAD_JS_BEGIN notification).
#106: Add notification, enabling PayLater message location overrides.
#113: Correct missing PayPal fields when the order's paid via credit- or debit-card.

13 Mar 2026, 7:50 PM
#418
chadlly2003 avatar

chadlly2003

Totally Zenned

Join Date:
Jan 2015
Posts:
824
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

lat9:

v1.3.1 of the 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:

#110: Auto-disable if root-directory files aren't copied; implies a root-directory file-system permissions issue.
#109: Correct Pay Later amounts and messaging.
#107: Adding the locale= parameter to the JS-SDK load, in an attempt to get PayPal language translations.
#111: Pay Later messaging not included for older templates (missing NOTIFY_HTML_HEAD_JS_BEGIN notification).
#106: Add notification, enabling PayLater message location overrides.
#113: Correct missing PayPal fields when the order's paid via credit- or debit-card.

I tested the upgrade. The only thing i found when the button is in the cart page the paypal button does not calculate. It ask you to put in the total.
The example i posted in a previously does calculate the cart.

Also note this module does not play nice with firefox. I have mentioned this before but have not really come up with a good solution. Anyone else having issue with this module in firefox.

For now i just went back to paypal express that seems to be fine on all browsers.

13 Mar 2026, 11:57 PM
#419
lat9 avatar

lat9

Administrator

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

Re: PayPal RESTful API Payment Module

chadlly2003:

I tested the upgrade. The only thing i found when the button is in the cart page the paypal button does not calculate. It ask you to put in the total.
The example i posted in a previously does calculate the cart.

Also note this module does not play nice with firefox. I have mentioned this before but have not really come up with a good solution. Anyone else having issue with this module in firefox.

For now i just went back to paypal express that seems to be fine on all browsers.
I don't understand "when the button is in the cart page the paypal button does not calculate", which 'button' are you referencing?

I'll note also that my primary browser is Firefox and I've had no issues with the payment module using that browser, Chrome or Edge (I don't own any i* devices).

14 Mar 2026, 3:46 AM
#420
chadlly2003 avatar

chadlly2003

Totally Zenned

Join Date:
Jan 2015
Posts:
824
Plugin Contributions:
0

Re: PayPal RESTful API Payment Module

lat9:

I don't understand "when the button is in the cart page the paypal button does not calculate", which 'button' are you referencing?

I'll note also that my primary browser is Firefox and I've had no issues with the payment module using that browser, Chrome or Edge (I don't own any i* devices).

PayLater Messaging- On the Shopping Cart page, the PayLater messaging should display an offer based on the total value of the items currently in the cart when the PayPal message is clicked.....

Just like the Paypal Messaging for the Product Page. Thats works just fine

This weekend I am going to dig into this paypal issue I am having. Not really sure why i am having these issue
I think its could be a browser setting or Server issue - too be continued