Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Invoice null when using PayPal IPN


sheerlock

Recommended Posts

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

)

Link to comment
Share on other sites

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

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

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

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

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

Link to comment
Share on other sites

In payment configuraton there is an for individual/aggregate that should be the reason.

 

So hide some important values and paste configuration details.

 

Satish

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

  • 3 months later...

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

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...