Support » Plugin: WordPress Simple Shopping Cart » PayPal Smart Checkout return empty item_number

  • Hello,

    The plugin works well for me, but when I activate PayPal Smart Checkout and make the payment by this method, the value of the IPN:
    $item_number = $ipn_data[ ‘item_number’ . $i ];
    This value is emplty…

    Whithout the PayPal Smart Checkout, item_number return the value that I put in the shortcode…
    ‘[wp_cart_button name=”‘.$post_name.’ (General)” price=”‘.$precio_moodle_pvp1.'” item_number=”‘.$moodle_curso_id.'”]’;

    It is some error of PayPal Smart Checkout ?

    Thanks,
    Sergio

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor mbrsolution

    (@mbrsolution)

    Hi Sergio, just out of curiosity. Have you set up PayPal IPN notification in your PayPal account?

    The following forum post also has a code similar to yours. I thought of sharing this to you just in case it might help you.

    Kind regards

    Thread Starter hwuser

    (@hwuser)

    Hello,

    Many thanks for your reply. I’ve used both options, but it still doesn’t work.

    I’ve used both options, but it still doesn’t work.
    I have activated the IPN notifications in paypal. Anyway, if you previously received the information by email, both by the email sent by the plugin itself, and by the email that I create personalized.

    Also, I have changed the shortcode also based on the forum you referenced.

    But I’m still not getting the item_number1. I receive all the data except that:

    …s:15:”address_country”;s:2:”ES”;s:12:”item_number1″;s:0:””;s:10:”item_name1″;s:68:”CURSO …General)”;s:9:”quantity1″;s:1:”1″;s:10:”mc_gross_1″;s:1:”1″;s:14:”num_cart_items”;s:1:…

    The log file is empty the item name too…
    [08/13/2020 11:22 PM] – SUCCESS :[[{“item_number”:””,”item_name”:”CURSO DE …

    That anyway, with the payment through the normal yellow PayPal button, it does return the article number:

    a:37:{s:8:”mc_gross”;s:4:”1.00″;s:22:”protection_eligibility”;s:8:”Eligible”;s:12:”item_number1″;s:2:”10″;s:8:”payer_id”;s:13:”3KP5DXQP9NUBG”;s:12:”payment_date”;s:25:”16:14:38 Aug 13, 2020 PDT”;s:14:”payment_status”;s:9:”Completed”;s:7:”charset”;s:12:”windows-1252″;

    The problem is when I pay with the PayPal Smart Checkout…

    Also, with the Paypal Smart Checkout, the reset not run well. Add some characters to the url that makes the reset not occur (amp%3B)

    ….p.com/?compra=ok&amp%3Breset_wp_cart=1

    Without the smart checkout, the reset works fine.

    Could this code that I have seen that makes item number empty have something to do with the problem?

    wordpress-simple-paypal-shopping-cart/paypal.php
    line 468
    foreach ( $data[ ‘transactions’ ][ 0 ][ ‘item_list’ ][ ‘items’ ] as $item ) {
    $ipn[ ‘item_number’ . $i ] = ”;
    $ipn[ ‘item_name’ . $i ] = $item[ ‘name’ ];
    $ipn[ ‘quantity’ . $i ] = $item[ ‘quantity’ ];
    $ipn[ ‘mc_gross_’ . $i ] = $item[ ‘price’ ] * $item[ ‘quantity’ ];
    $i ++;
    }

    Thanks,
    Sergio

    Plugin Contributor mbrsolution

    (@mbrsolution)

    Hi Sergio, this is a question for developers. I have submitted a message to the plugin developers to investigate further your issue.

    Thank you

    Thread Starter hwuser

    (@hwuser)

    ok I wait. thanks.

    Plugin Author mra13

    (@mra13)

    Is this for some custom coding you are doing or our plugin is failing to process the order on your site via smart checkout? I just tested the plugin by doing a checkout via smart checkout and everything in the plugin’s order system works fine.

    Remember, the smart checkout’s IPN is going to be different than the standard paypal checkout’s IPN. So if you are doing custom coding, you will need to account for that.

    Thread Starter hwuser

    (@hwuser)

    Hi,

    The plugin and the smart checkout work fine for me. No touched the code. I’m just saying that it doesn’t return the value of item number.

    Does it return that value to you?

    And I have referred to the code, because in the code function of:
    wordpress-simple-paypal-shopping-cart/paypal.php
    line 468

    function create_ipn_from_smart_checkout ($ data) {

    I’m surprised that the value of each item number is empty:

    $ipn[ ‘item_number’ . $i ] = ”;

    Not?

    • This reply was modified 1 year, 9 months ago by hwuser.
    Thread Starter hwuser

    (@hwuser)

    Hello, something new about this?

    Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘PayPal Smart Checkout return empty item_number’ is closed to new replies.