Got another one. I've got one large one-page error log and 13 paypal error logs.
In the paypal logs, I do see the code you mentioned earlier in some of them https://prnt.sc/v5eavw
Got the logs, James. I'll review today and in the morning.
I'm still working on the OPC change, but the following patch is required for all Zen Cart versions prior to the (not-yet-released) zc157a.
Edit (after making a copy) your store's /includes/modules/payment/paypalwpp.php, finding the following section:
and adding the following notification for OPC's (and other plugins') use:Code:/** * Get Override Address (uses sendto if set, otherwise uses customer's primary address) */ function getOverrideAddress() { global $db; // Only proceed IF *in* markflow mode AND logged-in (have to be logged in to get to markflow mode anyway) if (!empty($_GET['markflow']) && zen_is_logged_in()) { // From now on for this user we will edit addresses in Zen Cart, not by going to PayPal. $_SESSION['paypal_ec_markflow'] = 1; // debug $this->zcLog('getOverrideAddress - 1', 'Now in markflow mode.' . "\n" . 'SESSION[sendto] = ' . (int)$_SESSION['sendto']); // find the users default address id if (!empty($_SESSION['sendto'])) { $address_id = $_SESSION['sendto']; } else { $sql = "SELECT customers_default_address_id FROM " . TABLE_CUSTOMERS . " WHERE customers_id = :customerId"; $sql = $db->bindVars($sql, ':customerId', $_SESSION['customer_id'], 'integer'); $default_address_id_arr = $db->Execute($sql); if (!$default_address_id_arr->EOF) { $address_id = $default_address_id_arr->fields['customers_default_address_id']; } else { // couldn't find an address. return false; } }
That change was submitted (and accepted) for the zc157a 'core' yesterday.Code:/** * Get Override Address (uses sendto if set, otherwise uses customer's primary address) */ function getOverrideAddress() { global $db; // Only proceed IF *in* markflow mode AND logged-in (have to be logged in to get to markflow mode anyway) if (!empty($_GET['markflow']) && zen_is_logged_in()) { // From now on for this user we will edit addresses in Zen Cart, not by going to PayPal. $_SESSION['paypal_ec_markflow'] = 1; // debug $this->zcLog('getOverrideAddress - 1', 'Now in markflow mode.' . "\n" . 'SESSION[sendto] = ' . (int)$_SESSION['sendto']); // find the users default address id if (!empty($_SESSION['sendto'])) { $address_id = $_SESSION['sendto']; } else { $sql = "SELECT customers_default_address_id FROM " . TABLE_CUSTOMERS . " WHERE customers_id = :customerId"; $sql = $db->bindVars($sql, ':customerId', $_SESSION['customer_id'], 'integer'); $default_address_id_arr = $db->Execute($sql); if (!$default_address_id_arr->EOF) { $address_id = $default_address_id_arr->fields['customers_default_address_id']; } else { // couldn't find an address. return false; } } // ----- // Give a watching observer the opportunity to bypass this address-override. An observer // can disable the address-override processing by setting the $disable_address_override // parameter to specifically (bool)true. // $disable_address_override = false; $this->notify('NOTIFY_PAYPALWPP_DISABLE_GET_OVERRIDE_ADDRESS', $address_id, $disable_address_override); if ($disable_address_override === true) { $this->zcLog('getOverrideAddress - 1a', "Override disabled by observer request.\n"); return false; }
Hi Cindy - I too am starting to get these PayPal 10730 errors. We are on 1.5.7 and using OPC 2.3.3. Didn't upgrade to 2.3.4 yet, so if you think that addresses the issue, I can do that.
Whenever I see this error, the one common denominator I see in the PayPal_CURL error log is that it never lists a customer ZIP code. Here is what I see from the recent customer failure:
As you can see, there is no zip, no city, and the street address says "Default billing address".Code:Request Parameters: {DoExpressCheckoutPayment} Array ( [PAYMENTREQUEST_0_AMT] => 15.9 [PAYMENTREQUEST_0_ITEMAMT] => 9.95 [PAYMENTREQUEST_0_SHIPPINGAMT] => 5.95 [L_PAYMENTREQUEST_0_NUMBER0] => LOOPSNEWGEN [L_PAYMENTREQUEST_0_NAME0] => Loops New Generation by Yigal Mesika - Trick [22071] [L_PAYMENTREQUEST_0_QTY0] => 1 [L_PAYMENTREQUEST_0_AMT0] => 9.95 [PAYMENTREQUEST_0_PAYMENTACTION] => Sale [ALLOWEDPAYMENTMETHOD] => InstantPaymentOnly [PAYMENTREQUEST_0_SHIPTONAME] => Guest Customer, **do not remove** [PAYMENTREQUEST_0_SHIPTOSTREET] => Default billing address [PAYMENTREQUEST_0_SHIPTOCITY] => [PAYMENTREQUEST_0_SHIPTOSTATE] => CA [PAYMENTREQUEST_0_SHIPTOZIP] => [PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE] => US [BUTTONSOURCE] => ZenCart-EC_us [ADDROVERRIDE] => 1 [RETURNFMFDETAILS] => 0 [PAYMENTREQUEST_0_CUSTOM] => EC-30972-1603506358 [PAYMENTREQUEST_0_INVNUM] => 30972-1603506358-[MJMMagic] [PAYMENTREQUEST_0_CURRENCYCODE] => USD [TOKEN] => EC-83T582732X054240A [PAYERID] => FVMURM2NX3KC2 [NOTIFYURL] => https://www.domain.com/store/ipn_main_handler.php [METHOD] => DoExpressCheckoutPayment [USER] => customerservice_api1.domain.com [PWD] => **************** [VERSION] => 124.0 [SIGNATURE] => ****************************************************vHb3 ) Response: Array ( [TOKEN] => EC-83T582732X054240A [SUCCESSPAGEREDIRECTREQUESTED] => false [TIMESTAMP] => 2020-10-24T02:25:58Z [CORRELATIONID] => 3ea9da404272b [ACK] => Failure [VERSION] => 124.0 [BUILD] => 55009056 [L_ERRORCODE0] => 10730 [L_SHORTMESSAGE0] => Shipping Address Postal Code Empty [L_LONGMESSAGE0] => The field Shipping Address Postal Code is required [L_SEVERITYCODE0] => Error [CURL_ERRORS] => )
KEEPING IN MIND - This all seems to work fine for the most part. We still see a ton of orders come in using the Guest Account, both with PayPaldp and Paypalwpp. So it's not like the module isn't working. But I have seen these 10730 errors now once per day and can't figure out why it's not happening for everyone.
I just added that new block of code you mentioned above to see if that helps, but wanted to document here that this issue is also happening to us as well.
- Jeff
Jeff, you'll need the 'other side' of the change, too. See this One-Page Checkout Github commit for details. That change to OPC's observer-class grabs that new notification and instructs paypalwpp to bypass its address-override creation when the site's processing a guest checkout.
Zen Cart 1.5.5f
Template is M o z e n (forum won't let me post that word without the spaces)
OPC 2.3.4
I did follow the steps for 1.5.5f on GitHub
When trying to checkout, I'm getting a 500 error:
[26-Oct-2020 09:29:39 America/Chicago] PHP Parse error: syntax error, unexpected ')', expecting :: (T_PAAMAYIM_NEKUDOTAYIM) in /XXX/includes/modules/pages/checkout_one/header_php.php on line 355
Clearly this file is not the root cause. But if that's not the cause, where do I go looking for the real issue?
I'm having problems with Payment form styling changing if a user makes a change to the default shipping method after OPC page has loaded.
After inspecting the page in both conditions I've discovered that on initial page load the form fields all have
class="form-control"
But as soon as a shipping method is changed that class is removed from the form fields, messing up the form style.
Is there a fix for this, or do I need to modify my forms so they look nice without the "form-control" class?
Bookmarks