WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Customizing PayPal fields/parameters with WooCommerce (1 post)

  1. pacodoso
    Member
    Posted 11 months ago #

    Hello,

    I use WordPress (3.5.1) with the WooCommerce plugin (2.0.12).
    The payment gateway used is PayPal standard: in France, it's the only PayPal payment plugin that works.

    I have a PayPal Business account that I used so far with another eCommerce solution: UltraCart.

    I properly set WooCommerce and my PayPal account, following the recommendations provided here:
    Paypal-standard

    But I need to redefine some PayPal fields, because PayPal calls a webservice that generates activation keys for software that I sell, through the IPN url notification.
    Is this possible?

    The webservice expects the following parameters from PayPal:

    - item_name: product's name, must be changed to be the name of your product
    - item_number or custom: &is_productid=x&is_majorversion=y&is_minorversion=z&is_features=f where x,y,z and f must be replaced with the values that correspond to your product.

    But when I look at the my test orders logs with PayPal, I don't have the expected parameters:

    07-31-2013 @ 15:42:40 - Generating payment form for order n°2790. Notify URL: http://mywebsite.com/WpTest/?wc-api=WC_Gateway_Paypal
    07-31-2013 @ 15:44:26 - Checking IPN response is valid...
    07-31-2013 @ 15:44:26 - IPN Request: Array
    (
    [body] => Array
    (
    [cmd] => _notify-validate
    [mc_gross] => 95.90
    [invoice] => WC-n°2790
    [protection_eligibility] => Ineligible
    [item_number1] =>
    [payer_id] => P6A3KYERNYR6J
    [tax] => 0.00
    [payment_date] => 07:44:22 Jul 31, 2013 PDT
    [payment_status] => Pending
    [charset] => windows-1252
    [mc_shipping] => 0.00
    [mc_handling] => 0.00
    [first_name] => MyFirstName
    [notify_version] => 3.7
    [custom] => a:2:{i:0;i:2790;i:1;s:19:"order_51f92256c123d";}
    [payer_status] => unverified
    [business] => myPayPalEmail@email.com
    [num_cart_items] => 1
    [mc_handling1] => 0.00
    [verify_sign] => AiPC9BjkCyDFQXbSkoZcgqH3hpacAwI941SMkXdJavoVUY9lbLt4hsAy
    [payer_email] => myEmail@email.com
    [mc_shipping1] => 0.00
    [tax1] => 0.00
    [txn_id] => 826131534M2009929
    [payment_type] => instant
    [last_name] => MyName
    [item_name1] => Commande n°2790 - PRO TRAINING 3D ULTIMATE VERSION x 1
    [receiver_email] => myPayPalEmail@email.com
    [quantity1] => 1
    [receiver_id] => 6VWQ7BMWTPE32
    [pending_reason] => multi_currency
    [txn_type] => cart
    [mc_gross_1] => 95.90
    [mc_currency] => EUR
    [residence_country] => FR
    [test_ipn] => 1
    [transaction_subject] => a:2:{i:0;i:2790;i:1;s:19:"order_51f92256c123d";}
    [payment_gross] =>
    [ipn_track_id] => e426a4397d9f2
    )

    [sslverify] =>
    [timeout] => 60
    [user-agent] => WooCommerce/2.0.12
    )

    There are:
    - [item_number1] =>
    - [item_name1] => Commande n°2790 - PRO TRAINING 3D ULTIMATE VERSION x 1

    However, I added custom fields in the product that I defined on WooCommerce:
    - item_name : Pro Training 3D
    - item_number : &is_productid=2&is_majorversion=1&is_minorversion=0&is_features=0:3;1:2

    See the screenshot

    Is there a way to get the parameters I need?
    Should we change the "class-toilet-gateway-paypal.php" file?

    http://wordpress.org/plugins/woocommerce/

Reply

You must log in to post.

About this Plugin

About this Topic