sheerlock Posted January 23, 2007 Share Posted January 23, 2007 I have recently added the PayPal IPN with near total success. One glitch is that the invoice number is either not sent tp PayPal or not returned correctly by PayPal. Every invoice is "0" ie null. Below is the e-mail debug I have read the instructions regarding PayPal IPN but i cannot figure out why the invoice number can't get through to PayPal. Thanks for any help on this matter. Array ( [mc_gross] => -10.20 [invoice] => 0 [payer_id] => L2LS2GLZFJ2J4 [address_street] => 59A rue des Fiagues [payment_date] => 09:31:13 Jan 15, 2007 PST [payment_status] => Refunded [charset] => windows-1252 [address_zip] => 97421 [first_name] => john [mc_fee] => -0.60 [address_country_code] => FR [address_name] => anthony delaroche [notify_version] => 2.1 [reason_code] => refund [custom] => 2 [business] => @libertysurf.fr [address_country] => France [address_city] => LA RIVIERE [verify_sign] => AK2SA2hg8zYGSrc7DxLj3aSoXrN5AVQCRcdFtqw7CcIkF1tEAdtDdbI0 [payer_email] => [email protected] [parent_txn_id] => 98F717167502644H [txn_id] => 79F83769AJ2777630 [payment_type] => instant [last_name] => doe [address_state] => none [receiver_email] => @libertysurf.fr [payment_fee] => [receiver_id] => C7ZVYMXCDAUFG [mc_currency] => EUR [item_number] => [residence_country] => FR [payment_gross] => [shipping] => 0.00 ) Quote Link to comment Share on other sites More sharing options...
satish Posted January 23, 2007 Share Posted January 23, 2007 I have recently added the PayPal IPN with near total success. One glitch is that the invoice number is either not sent tp PayPal or not returned correctly by PayPal. Every invoice is "0" ie null. Below is the e-mail debug I have read the instructions regarding PayPal IPN but i cannot figure out why the invoice number can't get through to PayPal. Thanks for any help on this matter. Array ( [mc_gross] => -10.20 [invoice] => 0 [payer_id] => L2LS2GLZFJ2J4 [address_street] => 59A rue des Fiagues [payment_date] => 09:31:13 Jan 15, 2007 PST [payment_status] => Refunded [charset] => windows-1252 [address_zip] => 97421 [first_name] => john [mc_fee] => -0.60 [address_country_code] => FR [address_name] => anthony delaroche [notify_version] => 2.1 [reason_code] => refund [custom] => 2 [business] => @libertysurf.fr [address_country] => France [address_city] => LA RIVIERE [verify_sign] => AK2SA2hg8zYGSrc7DxLj3aSoXrN5AVQCRcdFtqw7CcIkF1tEAdtDdbI0 [payer_email] => [email protected] [parent_txn_id] => 98F717167502644H [txn_id] => 79F83769AJ2777630 [payment_type] => instant [last_name] => doe [address_state] => none [receiver_email] => @libertysurf.fr [payment_fee] => [receiver_id] => C7ZVYMXCDAUFG [mc_currency] => EUR [item_number] => [residence_country] => FR [payment_gross] => [shipping] => 0.00 ) Might be due to some configuration issues. paste the configuration details as can be seen thru admin. Satish Mantri Quote Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site. Check My About US For who am I and what My company does. Link to comment Share on other sites More sharing options...
Terra Posted January 23, 2007 Share Posted January 23, 2007 The invoice number is based on the session variable for the paypal cart id: $parameters['invoice'] = substr($cart_PayPal_IPN_ID, strpos($cart_PayPal_IPN_ID, '-')+1); and this is created by $_SESSION['cart_PayPal_IPN_ID'] = $cartID . '-' . $insert_id; $_SESSION is in use since PHP version 4.1.0 ... is there a chance that your PHP is older? in which case you could replace it by $cart_PayPal_IPN_ID = $cartID . '-' . $insert_id; all the best - Terra Quote My code for combining PayPal IPN with ** QTPro 4.25 ** osC Affiliate ** CCGV(trad) and how to solve the invoice already paid error General info: Allow customer to delete order comment ** FTP Programs & Text Editors ** Amending order email ** Link to comment Share on other sites More sharing options...
sheerlock Posted January 23, 2007 Author Share Posted January 23, 2007 The invoice number is based on the session variable for the paypal cart id: $parameters['invoice'] = substr($cart_PayPal_IPN_ID, strpos($cart_PayPal_IPN_ID, '-')+1); and this is created by $_SESSION['cart_PayPal_IPN_ID'] = $cartID . '-' . $insert_id; $_SESSION is in use since PHP version 4.1.0 ... is there a chance that your PHP is older? in which case you could replace it by $cart_PayPal_IPN_ID = $cartID . '-' . $insert_id; all the best - Terra Thank you for the quick reply. I am running php 4.4.4 Just to see, i tried modifying the code as above but nothing changes. After selecting PayPal payment ( checkout_shipping.php ) and clicking on continue button ( checkout_confirmation.php ) the database returns an error saying that the order number already exists ( order number "0"), i presume that there must be something at that point that generates the order number and for some reason it's not generated in the same way as if "cheque" or "bank transfer" is selected. Thanks Quote Link to comment Share on other sites More sharing options...
satish Posted January 25, 2007 Share Posted January 25, 2007 In payment configuraton there is an for individual/aggregate that should be the reason. So hide some important values and paste configuration details. Satish Quote Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site. Check My About US For who am I and what My company does. Link to comment Share on other sites More sharing options...
sheerlock Posted January 26, 2007 Author Share Posted January 26, 2007 I'm surprised that the aggregate/individual option causes the problem. I will nevertheless try when our broadband comes back since severe frost hit the country on monday and cut us out of electricity and telephone :lol: Quote Link to comment Share on other sites More sharing options...
sheerlock Posted January 29, 2007 Author Share Posted January 29, 2007 I'm surprised that the aggregate/individual option causes the problem. The "aggregate/individual" has no influence on the invoice number being null. Quote Link to comment Share on other sites More sharing options...
joelshotton Posted May 18, 2007 Share Posted May 18, 2007 I added $cart_PayPal_IPN_ID = $cartID . '-' . $insert_id; under where it set the session attribute: $_SESSION['cart_PayPal_IPN_ID'] = $cartID . '-' . $insert_id; in paypal_ipn.php and it seems to have fixed the problem with the "invoice" not being submitted to paypal. Joel Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.