Page 1 of 3 123 LastLast
Results 1 to 10 of 23
  1. #1
    Join Date
    Jan 2007
    Posts
    41
    Plugin Contributions
    1

    Default [Done v1.3.8] Paypal Express Checkout DB Bug - V1.3.7 Fresh

    Get this error after returning from Paypal (running in sandbox mode at the moment, but cant see it would be any different in Live)

    1406 Data too long for column 'payment_type' at row 1
    in:
    [INSERT INTO paypal (zen_order_id, txn_type, reason_code, payment_type, payment_status, pending_reason, invoice, first_name, last_name, payer_business_name, address_name, address_street, address_city, address_state, address_zip, address_country, address_status, payer_email, payer_id, payer_status, payment_date, business, receiver_email, receiver_id, txn_id, parent_txn_id, num_cart_items, mc_gross, mc_fee, mc_currency, settle_amount, settle_currency, exchange_rate, notify_version, verify_sign, date_added, memo) VALUES ('5', 'cart', 'None', 'PayPal Express Checkout (instant)', 'Completed', 'None', 'EC-741011165V964753K', 'leigh', 'Bee', '', 'leigh Bee', 'xxxx', 'xxxx', 'xxxx', 'xxxx', '', 'Confirmed', '[email protected]', 'ZPL8N67Q3LD5L', 'verified', '2007-01-06T15:03:07Z', '', 'sales.domain.co.uk', '', '87742182XA955612R', '', '1', '4.34', '0.35', 'GBP', '', 'GBP', '', '', '', now(), '')]

    Payment Type is currently a Varchar(7) I've updated my table to 35 to cater for this, but may need to be looked at a bit more closely.

    L.

  2. #2
    Join Date
    Jan 2007
    Posts
    41
    Plugin Contributions
    1

    Default Paypal Express Checkout Bug - V1.3.7 Fresh

    I get an error that says 'Transaction refused because of an invalid argument. See additional error messages for details.' and throws me back to Shipping page. The reason is the Order Total amount does not take into account our low order fee and so is £1 under. Hope that helps, I've just hard coded and extra £1 until I can get the module working from beginning to end.

    Extract from debug report:
    Request Headers: array (
    0 => 'Content-Type: text/namevalue',
    1 => 'X-VPS-Timeout: 45',
    2 => 'X-VPS-VIT-Client-Type: PHP/cURL',
    3 => 'X-VPS-VIT-Integration-Product: PHP::Zen Cart WPP-NVP',
    4 => 'X-VPS-VIT-Integration-Version: 0.1',
    )

    Request Parameters: array (
    'ITEMAMT' => '10.75',
    'SHIPPINGAMT' => '5.31',
    'AMT' => '16.06',
    'L_NUMBER0' => '0',
    'L_QTY0' => '5',
    'L_NAME0' => 'productDesc',
    'L_AMT0' => '1.95',
    'L_TAXAMT0' => '0.00',
    'SHIPTONAME' => 'xxxxx',
    'SHIPTOSTREET' => 'xxxxx',
    'SHIPTOSTREET2' => 'xxxxx',
    'SHIPTOCITY' => 'xxxxx',
    'SHIPTOSTATE' => 'xxxxx',
    'SHIPTOZIP' => 'xxxxx',
    'SHIPTOCOUNTRY' => 'GB',
    'BUTTONSOURCE' => 'ZenCart-EC_us',
    'TOKEN' => 'EC-2MY42117FG594260F',
    'PAYERID' => 'ZPL8N67Q3LD5L',
    'PAYMENTACTION' => 'Sale',
    'NOTIFYURL' => 'http://xxxxx/zencart/ipn_main_handler.php',
    'METHOD' => 'DoExpressCheckoutPayment',
    'CURRENCYCODE' => 'GBP',
    'USER' => 'sales_api1.xxxxx.co.uk',
    'PWD' => '****************',
    'VERSION' => '2.3',
    'SIGNATURE' => '****************************************************T.L7',
    )

    Response: array (
    'TIMESTAMP' => '2007-01-06T15:57:48Z',
    'CORRELATIONID' => '95ff626e2e363',
    'ACK' => 'SuccessWithWarning',
    'L_ERRORCODE0' => '10413',
    'L_SHORTMESSAGE0' => 'Transaction refused because of an invalid argument. See additional error messages for details.',
    'L_LONGMESSAGE0' => 'The totals of the cart item amounts do not match order amounts.',
    'VERSION' => '2.300000',
    'BUILD' => '1.0006',
    )

    DoExpressCheckoutPayment, Elapsed: 4710ms; SuccessWithWarning

  3. #3
    Join Date
    Jun 2003
    Posts
    33,721
    Plugin Contributions
    0

    Default Re: Paypal Express Checkout Bug - V1.3.7 Fresh

    If you turn off the low order fee, things function correctly?
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  4. #4
    Join Date
    Jan 2007
    Posts
    41
    Plugin Contributions
    1

    Default Unable to insert record into paypal table

    Running 1.3.7 Fresh Install

    Ok, nearly there I think!

    I'm still getting errors through the checkout_process stage concerning missing values for the script that inserts into the paypal table, here's the latest:

    1366 Incorrect decimal value: '' for column 'exchange_rate' at row 1
    in:
    [INSERT INTO paypal (zen_order_id, txn_type, reason_code, payment_type, payment_status, pending_reason, invoice, first_name, last_name, payer_business_name, address_name, address_street, address_city, address_state, address_zip, address_country, address_status, payer_email, payer_id, payer_status, payment_date, business, receiver_email, receiver_id, txn_id, parent_txn_id, num_cart_items, mc_gross, mc_fee, mc_currency, settle_amount, settle_currency, exchange_rate, notify_version, verify_sign, date_added, memo) VALUES ('16', 'cart', 'None', 'PayPal Express Checkout (instant)', 'Completed', 'None', 'EC-1XW697513L665122Y', 'leigh', 'xxxx', '', 'xxxx', 'xxxx', 'xxxx', 'xxxx', 'xxxx', '', 'Confirmed', '[email protected]', 'ZPL8N67Q3LD5L', 'verified', now(), '', 'sales.xxxx.co.uk', '', '5KL37273GW438694M', '', '1', '4.34', '0.35', 'GBP', '0', 'GBP', '', '', '', now(), '')]
    This has also happened for Settle_amount, and I dare say it will also happen to notify_version as that's a decimal field.

    Also to this take a look at the bugs section for a varchar field that was too short for the payment method type

    I have now replaced the following lines in paypalwpp.php in the modules section
    line 693 I inserted:
    // store the PayPal order meta data -- used for later matching and back-end processing services
    if (urldecode($this->responsedata['SETTLEAMT'])=='')
    {
    $SettleAMT = '0' ;
    } else {
    $SettleAMT = urldecode($this->responsedata['SETTLEAMT']);
    }
    line 720 to:
    'payment_date' => 'now()',
    (because of a datetime conversion error)
    line 731 to:
    'settle_amount' => $SettleAMT,
    line 733 to:
    'exchange_rate' => '1.00',
    (as I'm running single currency)

    The site is currently on an IIS6/PHP4.4(Zend Build)/W2k3Server but the line environment is an Apache/Linux box so maybe these issues will disappear in the future.

    Nearly There!

  5. #5
    Join Date
    Jun 2003
    Posts
    33,721
    Plugin Contributions
    0

    Default Re: Paypal Express Checkout DB Bug - V1.3.7 Fresh

    Please don't start a new thread for every post related to your PayPal Problem. The threads have all been merged here.
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

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

    Default Re: Paypal Express Checkout DB Bug - V1.3.7 Fresh

    As you mentioned, setting the payment_type field to varchar(35) will overcome the existing varchar(7) limitation.
    It will be set to varchar(40) in the next release.

    I'm attaching an updated version of the paypalwpp.php module, which should overcome all the empty-field problems as well as the amount subtotal problems which you encountered due to the low-order fee module etc.

    Please try it and let us know if it handles all of the things you've mentioned here.



    NOTE: Attachment moved to:
    http://www.zen-cart.com/forum/showpo...6&postcount=19
    .
    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.

  7. #7
    Join Date
    Jan 2007
    Posts
    41
    Plugin Contributions
    1

    Default Re: Paypal Express Checkout DB Bug - V1.3.7 Fresh

    Quote Originally Posted by kim
    Please don't start a new thread for every post related to your PayPal Problem. The threads have all been merged here.
    Sorry Kim, splitting the bugs into separate entries helps for me, but no probs.

    Quote Originally Posted by kim
    If you turn off the low order fee, things function correctly?
    Yes, Turning off low order fee fixed things for me (I've incorporated the additional charge into the products themselves as its actually a "handling fee" I charge), I have come across this problem with the Nochex APC payment module in osc.
    Quote Originally Posted by DrByte
    Please try it and let us know if it handles all of the things you've mentioned here.
    I'll try the update later on.

    As a side issue, my particular install of IIS6/php/curl/home broadband causes a lot of unexplained issues. Primarily ipn_main_handler.php returning a blank page after returning from PPEx - despite the handler receiving data from the Paypal servers -although the paypal logs (IPN*** log file) on the windows box say:

    Jan 06 2007 17:29 -- IPN FATAL ERROR::Could not find stored session in DB, cannot re-create session as PayPal IPN transaction.

    Jan 06 2007 17:29 -- IPN FATAL ERROR::No saved session data available

    Jan 06 2007 17:29 -- IPN NOTICE::ipn_application_top -> language files okay
    I moved the site over to an add-on domain on my 'nix box and all works fine now. I've not had the PPex Log folder writable on my 'nix box, however I'm going to check if the above message occurs on the now working module (nothing has changed except server environment)

  8. #8
    Join Date
    Jan 2007
    Posts
    17
    Plugin Contributions
    0

    Default Re: Paypal Express Checkout DB Bug - V1.3.7 Fresh

    ok I just tried the new updated paypalWPP.php file and it's still not working. It goes to an error 400 page and this is what the email log says.

    Email log:

    Subject:ec step 1_1
    Code:
     
    Checking to see if we are in markflow
    cart contents: physical
     
    NOTE: $this->showPaymentPage = 0
    Customer ID: 1
    Session Data: Array
    (
        [customers_host_address] => c-68-52-232-87.hsd1.tn.comcast.net
        [cartID] => 
        [cart] => shoppingcart Object
            (
                [observers] => Array
                    (
                    )
     
                [contents] => Array
                    (
                        [8:89eba7319f9e7bf128c85407454294cf] => Array
                            (
                                [qty] => 1
                                [attributes] => Array
                                    (
                                        [1] => 0
                                    )
     
                                [attributes_values] => Array
                                    (
                                        [1] => vizions
                                    )
     
                            )
     
                    )
     
                [total] => 35.18
                [weight] => 0
                [cartID] => 
                [content_type] => physical
                [free_shipping_item] => 0
                [free_shipping_weight] => 0
                [free_shipping_price] => 0
            )
     
        [navigation] => navigationhistory Object
            (
                [observers] => Array
                    (
                    )
     
                [path] => Array
                    (
                        [0] => Array
                            (
                                [page] => checkout_shipping
                                [mode] => NONSSL
                                [get] => 
                                [post] => Array
                                    (
                                    )
     
                            )
     
                        [1] => Array
                            (
                                [page] => checkout_payment
                                [mode] => NONSSL
                                [get] => 
                                [post] => Array
                                    (
                                    )
     
                            )
     
                        [2] => Array
                            (
                                [page] => checkout_confirmation
                                [mode] => NONSSL
                                [get] => 
                                [post] => Array
                                    (
                                    )
     
                            )
     
                        [3] => Array
                            (
                                [page] => index
                                [mode] => NONSSL
                                [get] => Array
                                    (
                                        [type] => ec
                                        [markflow] => 1
                                        [clearSess] => 1
                                        [stage] => final
                                    )
     
                                [post] => Array
                                    (
                                    )
     
                            )
     
                    )
     
                [snapshot] => Array
                    (
                    )
     
            )
     
        [check_valid] => true
        [language] => english
        [languages_id] => 1
        [languages_code] => en
        [currency] => USD
        [updateExpirations] => 1
        [session_counter] => 1
        [customers_ip_address] => 68.52.232.87
        [new_products_id_in_cart] => 
        [valid_to_checkout] => 1
        [cart_errors] => 
        [customer_id] => 1
        [customer_default_address_id] => 1
        [customers_authorization] => 0
        [customer_first_name] => Aaron
        [customer_country_id] => 223
        [customer_zone_id] => 56
        [sendto] => 1
        [payment] => paypalwpp
        [shipping] => Array
            (
                [id] => freeshipper_freeshipper
                [title] => Online Delivery (Online Delivery Only)
                [cost] => 0
            )
     
        [billto] => 1
        [cot_gv] => 0
        [comments] => 
        [paypal_ec_markflow] => 1
    )
    Email #2 subject:getoverrideaddress - 1

    Code:
     
    Now in markflow mode.
    SESSION[sendto] = 1
    Email#3 subject: getoverrideaddress - 2

    Code:
     
    $address_arr->fields = Array
    Email #4 subject: ec_step1 - 2 -submit

    Code:
     
    Array
    (
        [RETURNURL] => http://www.*****.com/ipn_main_handler.php?type=ec
        [CANCELURL] =>
    http://www.*****.com/index.php?main_...ng&ec_cancel=1
        [LOCALECODE] => US
        [CURRENCY] => USD
        [PAYMENTACTION] => Sale
        [ADDROVERRIDE] => 1
        [SHIPTONAME] => AaronHarper
        [SHIPTOSTREET] => 1307 *****
        [SHIPTOSTREET2] => 
        [SHIPTOCITY] => *****
        [SHIPTOZIP] => *****
        [SHIPTOSTATE] => TN
        [SHIPTOCOUNTRY] => US
        [REQCONFIRMSHIPPING] => 1
        [email] => aharper78 AT ***** DOT com
    )
    Did I miss somthing else in the fix?

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

    Default Re: Paypal Express Checkout DB Bug - V1.3.7 Fresh

    Error 400 is an odd duck. Can you tell me what your webserver's errorlogs are saying when the 400 error is triggered ?
    .
    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.

  10. #10
    Join Date
    Jan 2007
    Posts
    3
    Plugin Contributions
    0

    cart error Re: Paypal Express Checkout DB Bug - V1.3.7 Fresh

    I downloaded the update and it seemed to make the issue worse. Here is what I getting previous to the update:

    Warning: reset(): Passed variable is not an array or object in /usr/local/4admin/apache/vhosts/XXXXXXX.com/httpdocs/zencart/includes/modules/order_total/ot_tax.php on line 38
    >
    > Warning: Variable passed to each() is not an array or object in /usr/local/4admin/apache/vhosts/XXXXXXX.com/httpdocs/zencart/includes/modules/order_total/ot_tax.php on line 39
    >
    > Warning: Cannot modify header information - headers already sent by (output started at /usr/local/4admin/apache/vhosts/XXXXXXX.com/httpdocs/zencart/includes/modules/order_total/ot_tax.php:38) in /usr/local/4admin/apache/vhosts/XXXXXXX.com/httpdocs/zencart/includes/functions/functions_general.php on line 44


    and here is what I am getting now:

    Warning: in_array(): Wrong datatype for second argument in /usr/local/4admin/apache/vhosts/XXXXXXX.com/httpdocs/zencart/includes/modules/payment/paypalwpp.php on line 1317
    Warning: in_array(): Wrong datatype for second argument in /usr/local/4admin/apache/vhosts/XXXXXXX.com/httpdocs/zencart/includes/modules/payment/paypalwpp.php on line 1317
    Warning: in_array(): Wrong datatype for second argument in /usr/local/4admin/apache/vhosts/XXXXXXX.com/httpdocs/zencart/includes/modules/payment/paypalwpp.php on line 1317
    Warning: Cannot modify header information - headers already sent by (output started at /usr/local/4admin/apache/vhosts/XXXXXXX.com/httpdocs/zencart/includes/modules/payment/paypalwpp.php:1317) in /usr/local/4admin/apache/vhosts/XXXXXXX.com/httpdocs/zencart/includes/functions/functions_general.php on line 44

    I have done 3 fresh installs thus far and tried the PayPal express without changing anything.

    Please let me know when you get good news.

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Replies: 2
    Last Post: 5 Apr 2012, 06:42 AM
  2. Replies: 32
    Last Post: 2 Oct 2010, 10:23 PM
  3. Replies: 6
    Last Post: 2 Jun 2010, 09:39 AM
  4. Replies: 9
    Last Post: 30 May 2010, 03:34 AM
  5. [Done 1.4.0] Paypal Express Checkout welcome email question
    By shawnz28 in forum PayPal Express Checkout support
    Replies: 8
    Last Post: 13 Sep 2008, 04:47 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