Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,119
    Plugin Contributions
    29

    Default PayPal Express Checkout - Sandbox testing

    I'm not having any success with this, so in the aim of converting this into documentation, here we go... please correct my assumptions.

    Login to Developer site using the credentials of the Paypal account that you will be using for your shop.
    Create two sandbox accounts (may be auto-created):
    1) Business type, the credentials of which will be used in ZC module configuration.
    2) Personal type, which will be the test/buyer account.

    I have a vanilla 157 site on a separate server from my production site.

    Zen Cart: Setup Paypal Express Checkout

    from the sandbox Business account-> API Credentials
    Username:
    dksdcssblah_blah_api1.business.example.com
    Password:
    U29JZ4ZR4YCZ6XZY
    Signature:
    Ab3Mh4rtqN4ZrF9AO1pTQVgoi7paAgBltIHlUCnXrd8FfNpQ96iVtXYZ

    PayPal Merchant ID from Profile->Account ID
    ZBC9HXN3RBXYZ

    After entering these details and attempting a transaction, whether using InContext or old, I get bounced back to the 2/3 checkout payment page with an error:

    The address information you entered does not appear to be valid or cannot be matched. Please select or add a different address and try again. (10736) 10736 Shipping Address Invalid City State Postal Code - A match of the Shipping Address City, State, and Postal Code failed.
    At no point am I asked for PayPal login credentials.
    Neither do I see anywhere to "tell" PayPal the address/domain of this test site.

    From the site, the ipcheck is ok, the curtester is ok apart from tlstest.paypal.com being permanently offline.
    From Paypal developer, the IPN simulator reports that it connects.

    I see in the log there is a timeout error...but what to do about it?

    LOG1
    1585998853_Bkcc5.log)
    2020-04-04 01:14:13
    -------------------
    (sandbox transaction) --> https://api-3t.sandbox.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.6
    )Request Parameters: {SetExpressCheckout}
    Array
    ([PAYMENTREQUEST_0_AMT] => 302.49
    [PAYMENTREQUEST_0_ITEMAMT] => 299.99
    [PAYMENTREQUEST_0_SHIPPINGAMT] => 2.5
    [L_PAYMENTREQUEST_0_NUMBER0] => MG200MMS
    [L_PAYMENTREQUEST_0_NAME0] => Matrox G200 MMS [1] Model: Value Memory: 4 mb
    [L_PAYMENTREQUEST_0_QTY0] => 1
    [L_PAYMENTREQUEST_0_AMT0] => 299.99
    [PAYMENTREQUEST_0_CURRENCYCODE] => EUR
    [LOCALECODE] => US
    [GIFTMESSAGEENABLE] => 0
    [GIFTRECEIPTEENABLE] => 0
    [GIFTWRAPENABLE] => 0
    [GIFTWRAPNAME] =>
    [GIFTWRAPAMOUNT] => 0
    [BUYEREMAILOPTINENABLE] => 0
    [CUSTOMERSERVICENUMBER] =>
    [BRANDNAME] => ZC157 Torvista
    [PAYMENTREQUEST_0_PAYMENTACTION] => Sale
    [PAYMENTREQUEST_0_ALLOWEDPAYMENTMETHOD] => InstantPaymentOnly
    [ALLOWNOTE] => 1
    [LANDINGPAGE] => Billing
    [NOSHIPPING] => 0
    [ADDROVERRIDE] => 1
    [PAYMENTREQUEST_0_SHIPTONAME] => Bill Smith
    [PAYMENTREQUEST_0_SHIPTOSTREET] => 123 Any Avenue
    [PAYMENTREQUEST_0_SHIPTOCITY] => Here
    [PAYMENTREQUEST_0_SHIPTOZIP] => 12345
    [PAYMENTREQUEST_0_SHIPTOSTATE] => CA
    [PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE] => US
    [EMAIL] => root@localhost.com
    [RETURNURL] => https://www.TESTDOMAIN.com/zencart-157/ipn_main_handler.php?type=ec
    [CANCELURL] => https://www.TESTDOMAIN.com/zencart-157/index.php?main_page=checkout_shipping&ec_cancel=1
    [PAGESTYLE] => Primary
    [METHOD] => SetExpressCheckout
    [USER] => sb-nbe7j1368526_api1.business.example.com
    [PWD] => ****************
    [VERSION] => 124.0
    [SIGNATURE] => ****************************************************tW2D
    )Response:
    Array
    ([TIMESTAMP] => 2020-04-04T11:14:13Z
    [CORRELATIONID] => 3722855a7a1a7
    [ACK] => Failure
    [VERSION] => 124.0
    [BUILD] => 54394428
    [L_ERRORCODE0] => 10736
    [L_SHORTMESSAGE0] => Shipping Address Invalid City State Postal Code
    [L_LONGMESSAGE0] => A match of the Shipping Address City, State, and Postal Code failed.
    [L_SEVERITYCODE0] => Error
    [CURL_ERRORS] =>
    )SetExpressCheckout, Elapsed: 1618ms -- Failure


    TIMESTAMP=2020%2d04%2d04T11%3a14%3a13Z&CORRELATIONID=3722855a7a1a7&ACK=Failure&V ERSION=124%2e0&BUILD=54394428&L_ERRORCODE0=10736&L_SHORTMESSAGE0=Shipping%20Addr ess%20Invalid%20City%20State%20Postal%20Code&L_LONGMESSAGE0=A%20match%20of%20the %20Shipping%20Address%20City%2c%20State%2c%20and%20Postal%20Code%20failed%2e&L_S EVERITYCODE0=Error&CURL_ERRORS=

    LOG 2


    Apr-04-2020 13:14:12 (1585998852)getLineItemDetails 7 - subtotal comparisons
    BEFORE line-item calcs: Array
    ([PAYMENTREQUEST_0_AMT] => 302.49
    [PAYMENTREQUEST_0_ITEMAMT] => 299.99
    [PAYMENTREQUEST_0_TAXAMT] => 0
    [PAYMENTREQUEST_0_SHIPPINGAMT] => 2.5
    [PAYMENTREQUEST_0_SHIPDISCAMT] => 0
    [PAYMENTREQUEST_0_HANDLINGAMT] => 0
    [PAYMENTREQUEST_0_INSURANCEAMT] => 0
    )AFTER doing line-item calcs: Array
    ([PAYMENTREQUEST_0_AMT] => 302.49
    [PAYMENTREQUEST_0_ITEMAMT] => 299.99
    [PAYMENTREQUEST_0_TAXAMT] => 0
    [PAYMENTREQUEST_0_SHIPPINGAMT] => 2.5
    [PAYMENTREQUEST_0_SHIPDISCAMT] => 0
    [PAYMENTREQUEST_0_HANDLINGAMT] => 0
    [PAYMENTREQUEST_0_INSURANCEAMT] => 0
    [L_PAYMENTREQUEST_0_NUMBER0] => MG200MMS
    [L_PAYMENTREQUEST_0_NAME0] => Matrox G200 MMS [1] Model: Value Memory: 4 mb
    [L_PAYMENTREQUEST_0_QTY0] => 1
    [L_PAYMENTREQUEST_0_AMT0] => 299.99
    )=================================


    Apr-04-2020 13:14:12 (1585998852)
    getLineItemDetails 8
    checking subtotals...
    Array
    ([calculated total] => 302.49
    [PAYMENTREQUEST_0_AMT] => 302.49
    [PAYMENTREQUEST_0_ITEMAMT] => 299.99
    [PAYMENTREQUEST_0_SHIPPINGAMT] => 2.5
    )-------------------
    difference: 0 (abs+rounded: 0)
    =================================


    Apr-04-2020 13:14:12 (1585998852)
    getLineItemDetails 10
    subtotals balance - okay
    =================================


    Apr-04-2020 13:14:12 (1585998852)
    ec_step1 - 1
    Checking to see if we are in markflow
    cart contents: physical


    NOTE: $this->showPaymentPage = 1
    Customer ID: 1
    Session Data: Array
    ([securityToken] => 0da33566c28848b933bc9b0d6563bd0c
    [customers_host_address] => cm-188-171-175-201.telecable.es
    [cartID] => 67806
    [cart] => shoppingCart Object
    ([contents] => Array
    ([1:edff669e5da95c1d027b04d5412532fa] => Array
    ([qty] => 1
    [attributes] => Array
    ([3] => 5
    [4] => 1
    ))


    )


    [total] => 299.99
    [weight] => 23
    [cartID] => 67806
    [content_type] => physical
    [free_shipping_item] => 0
    [free_shipping_weight] => 0
    [free_shipping_price] => 0
    [download_count] => 0
    [total_before_discounts] => 299.99
    [display_debug_messages] =>
    [flag_duplicate_msgs_set] =>
    [flag_duplicate_quantity_msgs_set] => Array
    ()


    )


    [check_valid] => true
    [language] => english
    [languages_id] => 1
    [languages_code] => en
    [layoutType] => legacy
    [currency] => EUR
    [today_is] => 2020-04-04
    [updateExpirations] => 1
    [antispam_fieldname] => wSDkFalahR
    [session_counter] => 1
    [customers_ip_address] => 188.171.175.201
    [customer_id] => 1
    [customers_email_address] => root@localhost.com
    [customer_default_address_id] => 1
    [customers_authorization] => 0
    [customer_first_name] => Bill
    [customer_last_name] => Smith
    [customer_country_id] => 223
    [customer_zone_id] => 12
    [messageToStack] =>
    [valid_to_checkout] => 1
    [cart_errors] =>
    [sendto] => 1
    [payment] => paypalwpp
    [shipping_weight] => 26
    [shipping] => Array
    ([id] => item_item
    [title] => Per Item (Best Way)
    [cost] => 2.5
    )[billto] => 1
    [cot_gv] => 0.00
    [comments] =>
    [paypal_ec_markflow] => 1
    )=================================


    Apr-04-2020 13:14:12 (1585998852)
    ec-step1-addr_check
    cart content is not all virtual (or customer is not logged in) ... therefore will be submitting address details
    =================================


    Apr-04-2020 13:14:12 (1585998852)
    getOverrideAddress - 1
    Now in markflow mode.
    SESSION[sendto] = 1
    =================================


    Apr-04-2020 13:14:12 (1585998852)
    getOverrideAddress - 2
    $address_arr->fields = Array
    ([entry_firstname] => Bill
    [entry_lastname] => Smith
    [entry_company] => JustaDemo
    [entry_street_address] => 123 Any Avenue
    [entry_suburb] =>
    [entry_city] => Here
    [entry_postcode] => 12345
    [entry_country_id] => 223
    [entry_zone_id] => 12
    [entry_state] =>
    [zone_code] => CA
    [countries_iso_code_2] => US
    )=================================


    Apr-04-2020 13:14:12 (1585998852)
    ec-step1-addr_check3
    address details from override check:Array
    ([entry_firstname] => Bill
    [entry_lastname] => Smith
    [entry_company] => JustaDemo
    [entry_street_address] => 123 Any Avenue
    [entry_suburb] =>
    [entry_city] => Here
    [entry_postcode] => 12345
    [entry_country_id] => 223
    [entry_zone_id] => 12
    [entry_state] =>
    [zone_code] => CA
    [countries_iso_code_2] => US
    )=================================


    Apr-04-2020 13:14:12 (1585998852)
    ec_step1 - 2 -submit
    Array
    ([PAYMENTREQUEST_0_AMT] => 302.49
    [PAYMENTREQUEST_0_ITEMAMT] => 299.99
    [PAYMENTREQUEST_0_SHIPPINGAMT] => 2.5
    [L_PAYMENTREQUEST_0_NUMBER0] => MG200MMS
    [L_PAYMENTREQUEST_0_NAME0] => Matrox G200 MMS [1] Model: Value Memory: 4 mb
    [L_PAYMENTREQUEST_0_QTY0] => 1
    [L_PAYMENTREQUEST_0_AMT0] => 299.99
    [PAYMENTREQUEST_0_CURRENCYCODE] => EUR
    [LOCALECODE] => US
    [GIFTMESSAGEENABLE] => 0
    [GIFTRECEIPTEENABLE] => 0
    [GIFTWRAPENABLE] => 0
    [GIFTWRAPNAME] =>
    [GIFTWRAPAMOUNT] => 0
    [BUYEREMAILOPTINENABLE] => 0
    [CUSTOMERSERVICENUMBER] =>
    [BRANDNAME] => ZC157 Torvista
    [PAYMENTREQUEST_0_PAYMENTACTION] => Sale
    [PAYMENTREQUEST_0_ALLOWEDPAYMENTMETHOD] => InstantPaymentOnly
    [ALLOWNOTE] => 1
    [SOLUTIONTYPE] => Sole
    [LANDINGPAGE] => Billing
    [NOSHIPPING] => 0
    [ADDROVERRIDE] => 1
    [PAYMENTREQUEST_0_SHIPTONAME] => Bill Smith
    [PAYMENTREQUEST_0_SHIPTOSTREET] => 123 Any Avenue
    [PAYMENTREQUEST_0_SHIPTOCITY] => Here
    [PAYMENTREQUEST_0_SHIPTOZIP] => 12345
    [PAYMENTREQUEST_0_SHIPTOSTATE] => CA
    [PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE] => US
    [EMAIL] => root@localhost.com
    [RETURNURL] => https://www.TESTDOMAIN.com/zencart-157/ipn_main_handler.php?type=ec
    [CANCELURL] => https://www.TESTDOMAIN.com/zencart-157/index.php?main_page=checkout_shipping&ec_cancel=1
    )=================================


    Apr-04-2020 13:14:14 (1585998854)
    termEC-1
    Killed the session vars as requested
    =================================


    Apr-04-2020 13:14:14 (1585998854)
    termEC-2
    BEFORE: $this->showPaymentPage = 1
    Token Data:
    =================================


    Apr-04-2020 13:14:14 (1585998854)
    termEC-3
    AFTER: $this->showPaymentPage = 1
    =================================


    Apr-04-2020 13:14:14 (1585998854)
    termEC-4
    We ARE logged in, and $this->showPaymentPage === true
    =================================


    Apr-04-2020 13:14:14 (1585998854)
    termEC-6
    We DO have a shipping method selected, so goto PAYMENT
    =================================


    Apr-04-2020 13:14:14 (1585998854)
    termEC-10
    Redirecting to checkout_payment - Stack: checkout_payment
    Message: The address information you entered does not appear to be valid or cannot be matched. Please select or add a different address and try again. (10736) 10736 Shipping Address Invalid City State Postal Code - A match of the Shipping Address City, State, and Postal Code failed.
    Session Data: Array
    ([securityToken] => 0da33566c28848b933bc9b0d6563bd0c
    [customers_host_address] => cm-188-171-175-201.telecable.es
    [cartID] => 67806
    [cart] => shoppingCart Object
    ([contents] => Array
    ([1:edff669e5da95c1d027b04d5412532fa] => Array
    ([qty] => 1
    [attributes] => Array
    ([3] => 5
    [4] => 1
    ))
    )[total] => 299.99
    [weight] => 23
    [cartID] => 67806
    [content_type] => physical
    [free_shipping_item] => 0
    [free_shipping_weight] => 0
    [free_shipping_price] => 0
    [download_count] => 0
    [total_before_discounts] => 299.99
    [display_debug_messages] =>
    [flag_duplicate_msgs_set] =>
    [flag_duplicate_quantity_msgs_set] => Array
    ()
    )[check_valid] => true
    [navigation] => navigationHistory Object
    ([path] => Array
    ([0] => Array
    ([page] => time_out
    [mode] => SSL
    [get] => Array
    ()
    [post] => Array
    ()
    )[1] => Array
    ([page] => login
    [mode] => SSL
    [get] => Array
    ([action] => process
    )[post] => Array
    ()
    )[2] => Array
    ([page] => shopping_cart
    [mode] => SSL
    [get] => Array
    ()
    [post] => Array
    ()
    )[3] => Array
    ([page] => checkout_shipping
    [mode] => SSL
    [get] => Array
    ()
    [post] => Array
    ()
    )[4] => Array
    ([page] => checkout_payment
    [mode] => SSL
    [get] => Array
    ()
    [post] => Array
    ()
    )[5] => Array
    ([page] => checkout_confirmation
    [mode] => SSL
    [get] => Array
    ()
    [post] => Array
    ()
    )[6] => Array
    ([page] => index
    [mode] => SSL
    [get] => Array
    ([type] => ec
    [markflow] => 1
    [clearSess] => 1
    [stage] => final
    )[post] => Array
    ()
    ))
    [snapshot] => Array
    ()
    )[language] => english
    [languages_id] => 1
    [languages_code] => en
    [layoutType] => legacy
    [currency] => EUR
    [today_is] => 2020-04-04
    [updateExpirations] => 1
    [antispam_fieldname] => wSDkFalahR
    [session_counter] => 1
    [customers_ip_address] => 188.171.175.201
    [customer_id] => 1
    [customers_email_address] => root@localhost.com
    [customer_default_address_id] => 1
    [customers_authorization] => 0
    [customer_first_name] => Bill
    [customer_last_name] => Smith
    [customer_country_id] => 223
    [customer_zone_id] => 12
    [messageToStack] => Array
    ([0] => Array
    ([class] => checkout_payment
    [text] => The address information you entered does not appear to be valid or cannot be matched. Please select or add a different address and try again. (10736) 10736 Shipping Address Invalid City State Postal Code - A match of the Shipping Address City, State, and Postal Code failed.
    [type] => error
    ))


    [valid_to_checkout] => 1
    [cart_errors] =>
    [sendto] => 1
    [payment] => paypalwpp
    [shipping_weight] => 26
    [shipping] => Array
    ([id] => item_item
    [title] => Per Item (Best Way)
    [cost] => 2.5
    )[billto] => 1
    [cot_gv] => 0.00
    [comments] =>
    )=================================
    Steve
    github.com/torvista: Spanish Language Pack, Image Checker, Structured Data, BackupMySQL Admin/Auto, Product Listing Sorter, Redsys payment module...

  2. #2
    Join Date
    Jan 2019
    Location
    New Zealand
    Posts
    33
    Plugin Contributions
    0

    Default Re: PayPal Express Checkout - Sandbox testing

    Hi Torvista,

    I'm not sure how much address data PayPal actually matches, the one obvious thing to me is your test account zipcode is wrong. Californian zipcodes start with 9 so it possibly is failing at that point.

    Regards raptar
    Last edited by raptar; 4 Apr 2020 at 11:06 PM.

  3. #3
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,119
    Plugin Contributions
    29

    Default Re: PayPal Express Checkout - Sandbox testing

    PayPal never offers a login, so should not be trying to match anything at this point.
    Steve
    github.com/torvista: Spanish Language Pack, Image Checker, Structured Data, BackupMySQL Admin/Auto, Product Listing Sorter, Redsys payment module...

  4. #4
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    1,562
    Plugin Contributions
    2

    Default Re: PayPal Express Checkout - Sandbox testing

    Quote Originally Posted by torvista View Post
    PayPal never offers a login, so should not be trying to match anything at this point.
    yeah i think that's wrong, and you should enter a valid US shipping address.

    Code:
    gnome: # grepp _TEXT_ADDR_ERROR
    modules/payment/paypaldp.php:1882:          if ($response['L_ERRORCODE0'] == 10736) $errorText = MODULE_PAYMENT_PAYPALDP_TEXT_ADDR_ERROR;
    modules/payment/paypalwpp.php:2913:          if ($response['L_ERRORCODE0'] == 10736) $errorText = MODULE_PAYMENT_PAYPALWPP_TEXT_ADDR_ERROR;
    languages/english/modules/payment/paypaldp.php:45:  define('MODULE_PAYMENT_PAYPALDP_TEXT_ADDR_ERROR', 'The address information you entered does not appear to be valid or cannot be matched. Please select or add a different address and try again.');
    languages/english/modules/payment/paypalwpp.php:47:  define('MODULE_PAYMENT_PAYPALWPP_TEXT_ADDR_ERROR', 'The address information you entered does not appear to be valid or cannot be matched. Please select or add a different address and try again.');
    when i searched the ZC code for your error, it clearly looks like there is a $response that indicates the error. without digging further, it seems unlikely that the $response var is not something that came back from paypal.

    in addition, changing the shipping address to a valid shipping address is such an easy solution to test out as opposed to sticking to your guns about the paypal login.

    best.
    practice #socialdistancing #staysafe
    email is hard....
    help out with the green....

  5. #5
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,119
    Plugin Contributions
    29

    Default Re: PayPal Express Checkout - Sandbox testing

    I took a hammer to it and set
    [ADDROVERRIDE] = 0
    in the module code, to see what hapened...and the login came up and the order proceeded, producing multiple orders and a white page of death on confirmation,
    with
    PHP Fatal error: Uncaught Error: Call to undefined method paypalwpp:ayment_status() in /home/...../zencart-157/includes/modules/payment/paypalwpp.php:498

    Further investigation leads me to conclude this payment process does not work as I expected....so need to waste more time on this....
    Steve
    github.com/torvista: Spanish Language Pack, Image Checker, Structured Data, BackupMySQL Admin/Auto, Product Listing Sorter, Redsys payment module...

 

 

Similar Threads

  1. v155 paypal express sandbox mode....
    By carlwhat in forum PayPal Express Checkout support
    Replies: 4
    Last Post: 18 Oct 2017, 09:42 PM
  2. Express Checkout Error in sandbox..
    By riverman5b in forum PayPal Express Checkout support
    Replies: 0
    Last Post: 30 Jul 2013, 03:41 PM
  3. Testing PayPal Express Checkout - PayPal rejecting my CC
    By dryaquaman in forum PayPal Express Checkout support
    Replies: 2
    Last Post: 30 Oct 2010, 01:48 PM
  4. testing express with sandbox, error
    By cjnoyes in forum PayPal Express Checkout support
    Replies: 4
    Last Post: 21 Jun 2009, 04:37 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR