Page 6 of 10 FirstFirst ... 45678 ... LastLast
Results 51 to 60 of 92
  1. #51
    Join Date
    Feb 2008
    Posts
    13
    Plugin Contributions
    0

    Default Re: Paypal no longer working - 10413

    That commented code is content many "if" structures, so that code isn't good for us. We need unset the subtotal values always, so the best way if you insert the three rows, what i wrote:)

    Quote Originally Posted by DivaVocals View Post
    Thanks for the clarified code.. and it's not that I am not grateful.. but I still want to understand something.. I found this commented out code in BOTH PayPal files
    Code:
    /*  //PayPal API spec contradicts itself ... and apparently neither of these "requirements" are enforced. 
        //Thus skipping this section for now:
    
        // according to API specs, these cannot be set if they contain zero values, so unset if they are zero:
        if ($optionsST['TAXAMT'] == 0)      unset($optionsST['TAXAMT']);
        if ($optionsST['SHIPPINGAMT'] == 0) unset($optionsST['SHIPPINGAMT']);
        if ($optionsST['HANDLINGAMT'] == 0) unset($optionsST['HANDLINGAMT']);
        // set missing subtotals if they are zero values, since all must be submitted
        if (!isset($optionsST['TAXAMT']))      $optionsST['TAXAMT'] = 0;
        if (!isset($optionsST['SHIPPINGAMT'])) $optionsST['SHIPPINGAMT'] = 0;
        if (!isset($optionsST['HANDLINGAMT'])) $optionsST['HANDLINGAMT'] = 0;
    */
    Wouldn't un-commenting this code be the SAME/SIMILAR as what you are suggesting I do to modify to these files???

  2. #52
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Paypal no longer working - 10413

    Got it.. I'll give your fix a try.. Nothing else works.. and you fix makes logical sense considering that this is a totaling error or some sort..

  3. #53
    Join Date
    Jan 2008
    Location
    Southern California Coast
    Posts
    183
    Plugin Contributions
    0

    Default Re: Paypal no longer working - 10413

    Any news?

    - Jason

  4. #54
    Join Date
    Feb 2008
    Posts
    13
    Plugin Contributions
    0

    Default Re: Paypal no longer working - 10413

    The fix resolved the problem in the webshop what i created.
    The shop's running properly for three weeks, there was many transactions via paypal, and everything is ok :)

    Quote Originally Posted by DieuxSoldat_04 View Post
    Any news?

    - Jason

  5. #55
    Join Date
    Jan 2008
    Location
    Southern California Coast
    Posts
    183
    Plugin Contributions
    0

    Default Re: Paypal no longer working - 10413

    I am actually doing some tests right now. So far so good. Great job finding this Monz. Will let you know if the fix seems resolute in a moment.

    - Jason

  6. #56
    Join Date
    Jan 2008
    Location
    Southern California Coast
    Posts
    183
    Plugin Contributions
    0

    Default Re: Paypal no longer working - 10413

    Testing Completed
    Test performed with PayPal Developer Sandbox accounts.
    Test used 3 Accounts, 3 Products, 3 Attributes, 3 price ranges, and 3 different sized items.


    • Test Account 1
      • Purchased Product A: Succeeded
        • Price $1077.49
        • Attribute D
        • Large Sized Item


    • Test Account 2
      • Purchased Product B: Succeeded
        • Price $592.61
        • Attribute C
        • Medium Sized Item


    • Test Account 3
      • Purchased Product C: Succeeded
        • Price $183.16
        • Attribute A
        • Small Sized Item




    So three different tests with three different items varying by hundreds in price, shape and weight, and attributes, yet all of them worked! I think this might be it Captain!

    Nothing seems to be a problem for Zen Cart to communicate to PayPal now. Everything seems functional. If a few others can also confirm this works, I think this would be the most resolute fix. All the other ones I tried only worked for some people or continued to have random errors later on.

    To credit Monsz: Original Post

    Good job mate!

    Thanks!
    Warm Regards,
    Jason

  7. #57
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Paypal no longer working - 10413

    If you leave out those values, what happens to the receipt issued by PayPal?
    .
    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  8. #58
    Join Date
    Jan 2008
    Location
    Southern California Coast
    Posts
    183
    Plugin Contributions
    0

    Default Re: Paypal no longer working - 10413

    Hey Doc,

    No difference really. Just displays the total the store displays at checkout. I included an image just in case this isn't the receipt . Sandbox accounts use fake email addresses so I'm not sure if it is the receipt but I did log in to the Sandbox Buyer account and click on "Details" for the test purchase.

    Supposed Receipt.

    Let me know if it seems right.

    - Jason

    Edit:

    To me, as long as the right amount is charged and the total is the same as indicated on my store, then it's ok with me, heh.

    Also, I was wondering, PayPal charges a percentage of the transaction as a fee right? Then would it be possible to make the Zen Cart add that charge to all PayPal payments or have the PayPal account itself do it so the customer is charged the fee? I probably won't do it but would be nice to know, ; ].
    Last edited by DieuxSoldat_04; 8 Oct 2008 at 01:43 AM. Reason: Question

  9. #59
    Join Date
    Sep 2007
    Posts
    12
    Plugin Contributions
    0

    Default Re: Paypal no longer working - 10413

    This fix worked perfectly for me

    Thanks very much

  10. #60
    Join Date
    Nov 2008
    Posts
    2
    Plugin Contributions
    0

    Default Re: Paypal no longer working - 10413

    Quote Originally Posted by Monsz View Post
    What I did was: In paypaldp.php (Paypal Website Payments Pro class) insert this code to the rows 1301-1303, in paypalwpp.php (Paypal Express Checkout) insert to the rows 1519-1522:
    PHP Code:
        unset($optionsST['TAXAMT']);
        unset(
    $optionsST['SHIPPINGAMT']);
        unset(
    $optionsST['HANDLINGAMT']); 
    The modified code will like this in both files:
    PHP Code:

        
    // subtotals have to add up to AMT
        // Thus, if there is a discrepancy, make adjustment to HANDLINGAMT:
        
    $st $optionsST['ITEMAMT'] + $optionsST['TAXAMT'] + $optionsST['SHIPPINGAMT'] + $optionsST['HANDLINGAMT'];
        if (
    $st != $optionsST['AMT']) $optionsST['HANDLINGAMT'] += strval($optionsST['AMT'] - $st);


            
    //**************inserted code for unset subtotals********************************************************************
        
    unset($optionsST['TAXAMT']);
        unset(
    $optionsST['SHIPPINGAMT']);
        unset(
    $optionsST['HANDLINGAMT']);
            
    //*********************************************************************************************

    /*  //PayPal API spec contradicts itself ... and apparently neither of these "requirements" are enforced. 
        //Thus skipping this section for now: 

    I suggest you, before make the change, backup both files, if you make mistake, you can upload the original files.


    Thanks Monsz, it worked perfectly when all the other solutions failed. You have made me very very happy!!
    Ab Fab

 

 
Page 6 of 10 FirstFirst ... 45678 ... LastLast

Similar Threads

  1. v1371 paypal error 10413
    By hellogxp in forum PayPal Express Checkout support
    Replies: 4
    Last Post: 17 Jan 2013, 05:17 AM
  2. v139h Coupon + Tax + paypal = error 10413
    By gothstone in forum PayPal Website Payments Pro support
    Replies: 3
    Last Post: 16 Jan 2013, 03:15 PM
  3. 10413 error on paypal
    By Zubey in forum PayPal Express Checkout support
    Replies: 21
    Last Post: 6 Jan 2009, 01:30 AM
  4. PayPal error 10413 Random
    By LekeFly in forum PayPal Express Checkout support
    Replies: 4
    Last Post: 21 Sep 2008, 09:49 PM

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