Re: One-Page Checkout [Support Thread]
v1.5.5f php 7.1 OPC v2.3.4
Hello Cindy,
I have been getting PayPal error code 10730 'Shipping Address Postal Code Empty - The field Shipping Address Postal Code is required'... only when checking out as a Guest and electing to pay via PayPal. There are no other issues with checkout and OPC, just this.
I have applied the patch you posted here (https://www.zen-cart.com/showthread....72#post1374172) however it is not working for me. (ever the pessimist I figure it may be a v155F quirk (???) )
I am not getting an OPC debug report but am getting PayPal CURL debugs (see example below)
Code:
2020-11-13 01:02:51
-------------------
(live transaction) --> https://api-3t.paypal.com/nvp
Request Headers:
Array
(
[0] => Content-Type: text/namevalue
[1] => X-VPS-Timeout: 90
[2] => X-VPS-VIT-Client-Type: PHP/cURL
[3] => X-VPS-VIT-Integration-Product: PHP::Zen Cart(R) - PayPal/NVP
[4] => X-VPS-VIT-Integration-Version: 1.5.5
)
Request Parameters: {DoExpressCheckoutPayment}
Array
(
[PAYMENTREQUEST_0_AMT] => 17.46
[PAYMENTREQUEST_0_ITEMAMT] => 12.56
[PAYMENTREQUEST_0_SHIPPINGAMT] => 4.9
[L_PAYMENTREQUEST_0_NUMBER0] => ClipOn_433
[L_PAYMENTREQUEST_0_NAME0] => Silver Clip On Earrings, Fashion Earrings, Turkish Influence [212]
[L_PAYMENTREQUEST_0_QTY0] => 1
[L_PAYMENTREQUEST_0_AMT0] => 12.56
[PAYMENTREQUEST_0_SHIPTONAME] => Guest Customer, **do not remove**
[PAYMENTREQUEST_0_SHIPTOSTREET] => Default billing address
[PAYMENTREQUEST_0_SHIPTOCITY] =>
[PAYMENTREQUEST_0_SHIPTOSTATE] => SA
[PAYMENTREQUEST_0_SHIPTOZIP] =>
[PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE] => AU
[BUTTONSOURCE] => ZenCart-EC_us
[ADDROVERRIDE] => 1
[RETURNFMFDETAILS] => 0
[PAYMENTREQUEST_0_CUSTOM] => EC-33-1605232971
[PAYMENTREQUEST_0_INVNUM] => 33-1605232971-[DazzlersClipOnEarrings]
[PAYMENTREQUEST_0_CURRENCYCODE] => AUD
[TOKEN] => EC-45W88961NA283840S
[PAYERID] => DFX4AE5BAT5QU
[PAYMENTREQUEST_0_PAYMENTACTION] => Sale
[NOTIFYURL] => https://www.dazzlerscliponearrings.com.au/ipn_main_handler.php
[METHOD] => DoExpressCheckoutPayment
[USER] => dazzlers2009_api1.hotmail.com
[PWD] => ****************
[VERSION] => 124.0
[SIGNATURE] => ****************************************************SLns
)
Response:
Array
(
[TOKEN] => EC-45W88961NA283840S
[SUCCESSPAGEREDIRECTREQUESTED] => false
[TIMESTAMP] => 2020-11-13T02:02:51Z
[CORRELATIONID] => 1ebb03776eb0d
[ACK] => Failure
[VERSION] => 124.0
[BUILD] => 55058010
[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] =>
)
DoExpressCheckoutPayment, Elapsed: 387ms -- Failure
TOKEN=EC%2d45W88961NA283840S&SUCCESSPAGEREDIRECTREQUESTED=false&TIMESTAMP=2020%2d11%2d13T02%3a02%3a51Z&CORRELATIONID=1ebb03776eb0d&ACK=Failure&VERSION=124%2e0&BUILD=55058010&L_ERRORCODE0=10730&L_SHORTMESSAGE0=Shipping%20Address%20Postal%20Code%20Empty&L_LONGMESSAGE0=The%20field%20Shipping%20Address%20Postal%20Code%20is%20required&L_SEVERITYCODE0=Error&CURL_ERRORS=
This is a copy of the segment of my includes/modules/payment/paypalwpp.php (hopefully the patch is inserted correctly)
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']) && isset($_SESSION['customer_id']) && $_SESSION['customer_id']) {
// 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;
}
cheers,
Mike
Re: One-Page Checkout [Support Thread]
Mike, that's because the addition I'd posted for paypalwpp.php was necessary but not sufficient to correct the problem. I've got the full update staged on OPC's GitHub repository (https://github.com/lat9/one_page_che...17cbe0f8166ec3) for the upcoming 2.3.5 release.
Re: One-Page Checkout [Support Thread]
I've just submitted OPC v2.3.5 to the downloads area.
This release contains changes associated with the following GitHub issues:
#265: Form entries, use placeholder instead of trailing span to identify required fields.
#271: Correct checkout-loop when an order's total goes negative, which can happen with "Reward Points".
#272: Add a diagnostic tool to help identify the cause of checkout-redirection loops.
#274: Update the jQuery handling to address 'double-submit' concerns.
#275: Correct "Error 10730 Shipping Address Postal Code Empty" error when using paypalwpp payments.
#276: Remove unwanted HTML generation from the base OPC class.
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
lat9
I've just submitted OPC v2.3.5 to the downloads area.
This release contains changes associated with the following GitHub issues:
#265: Form entries, use placeholder instead of trailing span to identify required fields.
#271: Correct checkout-loop when an order's total goes negative, which can happen with "Reward Points".
#272: Add a diagnostic tool to help identify the cause of checkout-redirection loops.
#274: Update the jQuery handling to address 'double-submit' concerns.
#275: Correct "Error 10730 Shipping Address Postal Code Empty" error when using paypalwpp payments.
#276: Remove unwanted HTML generation from the base
OPC class.
Now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2095
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
lat9
:oops:
v2.3.5 introduced a change that renders Guest Checkout 'unusable' for sites that have Configuration :: Customer Details :: State - Always display as pulldown? set to true. These sites can work around the issue by temporarily setting that value to false while I get a v2.3.6 correction released.
That'll be (hopefully) tomorrow.
Re: One-Page Checkout [Support Thread]
I've just submitted v2.3.6 of One Page Checkout for the Zen Cart moderators' review; I'll post back here when it's available for download.
This release contains changes associated with the following GitHub issues:
#278: Remove unneeded create_account.css files.
#279: Correct CSS validation issues for the checkout_one.css files.
#280: Correct "Guest checkout can't complete when country/state dropdowns are used". This bug was introduced in v2.3.5.
Re: One-Page Checkout [Support Thread]
I know I have encountered this before and it was an easy fix but darned if I can remember it!
1.5.6c site and latest version of OPC - I cannot enter credit card info when using guest checkout. Everything is all "blurred out" except for the name, email and phone. They are using SQUARE as the payment module. I faintly remember having to copy a file to another directory......
HELP!!
Re: One-Page Checkout [Support Thread]
Was it the /includes/modules/checkout_payment/jscript_square.php file to copy into the /includes/modules/checkout_one directory?
I think it's mentioned in the bottom of the checkout-one docs.
Re: One-Page Checkout [Support Thread]
Upgrading the SQUARE module right now - slow and go out here in the forest of Montana! lol But I don't see a file like that in the mod.... even under /pages/ section.... will keep reading on down the mod help file to see if I find anything.
Thanks Chris!
Re: One-Page Checkout [Support Thread]
Quote:
Originally Posted by
DrByte
Was it the /includes/modules/checkout_payment/jscript_square.php file to copy into the /includes/modules/checkout_one directory?
I think it's mentioned in the bottom of the checkout-one docs.
Ok just tried that and it did not work. :(