Results 1 to 1 of 1
  1. #1
    Join Date
    Sep 2011
    Location
    Tokyo
    Posts
    18
    Plugin Contributions
    1

    Default Paypal Express French translation issue + Duplicate transaction accepted as valid

    Hello!

    ZenCart 1.5.6c
    PHP 5.6.40 (I know...)

    Quick summary:
    1. Paypal WPP French translation is breaking Paypal Express confirmation => easy fix below
    2. Transactions rejected as duplicates by Paypal Express appear successful in ZC => I don't have a fix for that



    After successfully upgrading to ZC1.5.6c + utf8mb4 to support emojis, I made a quick Paypal Express live purchase and it failed this way:

    1. Create Cart
    2. Proceed to purchase using Paypal Express
    3. Transaction is a success
    4. Paypal table is not updated on: PHP Fatal error: 1406: Data too long for column 'payment_type' at row 1 :: INSERT INTO paypal
    5. User is not sent back to the purchase confirmation page (WARNING: An Error occurred, please refresh the page and try again.)


    Indeed the payment_type is using define('MODULE_PAYMENT_PAYPALWPP_EC_TEXT_TYPE', 'Encaissement avec PayPal Expresst'); found in /includes/languages/french/modules/payment/paypalwpp.php and the resulting field was Encaissement avec PayPal Expresst which is then concatenated with (instant) and ends up at 42 characters when the table only allows 40.

    I trimmed the translation (and fixed the typo) to PayPal Express (instant), inserted the missing paypal table entry manually and the world was in balance again.

    BEFORE:
    ZC Order -> OK
    Paypal Payment -> OK
    Paypal ZC update -> Failed

    AFTER:
    ZC Order -> OK
    Paypal Payment -> OK
    Paypal ZC update -> OK (manually)


    Then I tried again Paypal Express to validate the fix. This is where it gets a little more complicated.

    1. Cart was still alive from previous attempt
    2. Modified the cart (remove/add a different item) but SAME global price
    3. Validate purchase choosing Paypal
    4. I reached the successful purchase page WITHOUT CONFIRMING Paypal payment => Basically I never saw the Paypal popup
    5. ZC thinks the transaction is a success (order+Paypal) but there is no Paypal payment


    This is the return from Paypal (selected lines):

    Code:
    Mar-12-2021 15:23:42 (1615559022)
    before_process - EC-5
    resultset:
    Array
    (
    [TOKEN] => EC-2EX728800F188990X
    [SUCCESSPAGEREDIRECTREQUESTED] => false
    [TIMESTAMP] => 2021-03-12T14:23:41Z
    [ACK] => SuccessWithWarning
    [VERSION] => 124.0
    [BUILD] => 55384336
    [L_ERRORCODE0] => 11607
    [L_SHORTMESSAGE0] => Duplicate Request
    [L_LONGMESSAGE0] => A successful transaction has already been completed for this token.
    [L_SEVERITYCODE0] => Warning
    [PAYMENTINFO_0_TRANSACTIONTYPE] => cart
    [PAYMENTINFO_0_PAYMENTTYPE] => instant
    [PAYMENTINFO_0_ORDERTIME] => 2021-03-12T13:52:11Z
    [PAYMENTINFO_0_AMT] => 2.50
    [PAYMENTINFO_0_FEEAMT] => 0.42
    [PAYMENTINFO_0_TAXAMT] => 0.00
    [PAYMENTINFO_0_CURRENCYCODE] => EUR
    [PAYMENTINFO_0_PAYMENTSTATUS] => Completed
    [PAYMENTINFO_0_PENDINGREASON] => None
    [PAYMENTINFO_0_REASONCODE] => None
    [PAYMENTINFO_0_ERRORCODE] => 0
    [PAYMENTINFO_0_ACK] => Success
    [CURL_ERRORS] =>
    )
    ZC Order -> OK (but it shouldn't)
    Paypal Payment -> Failed (SuccessWithWarning)
    Paypal ZC update -> OK (but it shouldn't)


    So it seems that there was 2 issues:

    1/ ZenCart kept the same CART ID even though it had been modified (a left-over from the failed paypal insertion that seems to be preceding the cart validation/deletion)
    2/ Paypal gently DENIES the transaction but this send a "SuccessWithWarning" thinking it was really the same transaction and acknowledging the success of the PREVIOUS one

    Note that Paypal also offers a setting in the Pro Seller's page to either accept or reject payments that seem to be duplicates.
    By default it was on "reject", it has been updated to "accept" but I haven't tested that yet.

    Julien
    Last edited by generikz; 14 Mar 2021 at 11:40 AM.

 

 

Similar Threads

  1. Authorize.Net AIM (Duplicate Transaction Issue) v1.3.8
    By spry in forum Addon Payment Modules
    Replies: 3
    Last Post: 24 Oct 2011, 07:50 PM
  2. PayPal express - the ZC order is ok bat no PayPal transaction
    By joe1joe1 in forum Built-in Shipping and Payment Modules
    Replies: 22
    Last Post: 10 Apr 2011, 03:44 PM
  3. PayPal Express error 10002 security header not valid
    By imaginationtoy in forum PayPal Express Checkout support
    Replies: 4
    Last Post: 3 Sep 2010, 11:17 PM
  4. Paypal Express Payments appear ok in Zencart, but no record of transaction in Paypal
    By davidgdang1T in forum PayPal Express Checkout support
    Replies: 7
    Last Post: 17 May 2009, 10:42 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