Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Mark Evans

Official PayPal IPN Support Thread

Recommended Posts

The order should has been created before the customer goes to PayPal page. It is the key feature of this payment module, to prevent losing orders if the customer doesn't come back after paying at PayPal.

 

Thanks

 

So is there any way to easily verify if the items were actually paid for?

 

We receive a lot of orders daily and checking in paypal eats up time.

Share this post


Link to post
Share on other sites
Thanks

 

So is there any way to easily verify if the items were actually paid for?

 

We receive a lot of orders daily and checking in paypal eats up time.

 

Our order department uses paypal as a reference to what orders need to be processed and not OSC.

Share this post


Link to post
Share on other sites
Thanks

 

So is there any way to easily verify if the items were actually paid for?

 

We receive a lot of orders daily and checking in paypal eats up time.

 

Do you receive email notifications from Paypal of the payments received? I've set up our Paypal account to send email notifications when a payment is received and this eliminates the need for me to go double check at Paypal.

 

There might be a better, more efficient way to do this but I am only a beginner at all this so for now it's the only way I've found.

Share this post


Link to post
Share on other sites

I keep entering the email address for the paypal account and it doesn't save it. Its there a way to store the email address right into the php?

Share this post


Link to post
Share on other sites

I keep entering the email address for the paypal account and it doesn't save it. Its there a way to store the email address right into the php?

Share this post


Link to post
Share on other sites

I thought I had everything setup right but i received a email with the following:

 

PayPal IPN Invalid Process

 

$_POST:

 

 

$_GET:

 

Can anyone help with this error

 

Thanks

Share this post


Link to post
Share on other sites

Further to my problem of getting this module working on 1&1 shared servers

(http://forums.oscommerce.com/index.php?act=findpost&pid=1028257)

 

I've just found this post at

http://www.zen-cart.com/forum/archive/index.php/t-55802.html

 

DrByte

19th January 2007, 09:32 AM

Okay ... so, figured it out.

 

1and1 has *yet again* done something no other host has done ... they seem to think they're smart to add a Carriage Return AND a Line Break to the end of all CURL responses.

In the myriad of tests I've done on other hosts, I've never seen any of them muck with the result set ... only 1and1.

 

Anyway, a patch has been built and can be found here (http://www.zen-cart.com/forum/showthread.php?t=56216).

Could this be relevant?

 

Thanks

Alan

Share this post


Link to post
Share on other sites
Guest

Hi

 

About how the mod "Second Address Line" doesn't write this second address line in the order confirmation email.

I managed to implement it everywhere else in the backend, but no success for the email.

 

Could someone point me how to concatenate this field with the first address line when the email is built?

 

the email is built in

 

includes/modules/payment/paypal_ipn.php

 

with:

 

if ($order->content_type != 'virtual') {
	$email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" .
					EMAIL_SEPARATOR . "\n" .
					tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n";
  }

 

I can't find how the $sendto is buit.

 

Thanks!

Share this post


Link to post
Share on other sites

There is a payment status that is updated thru ipn when paypal thru IPN sends details of payment recd.

This modifies the data base and should be suficient enough to make out whether the payment was recd or not.

 

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.

Share this post


Link to post
Share on other sites
Guest
There is a payment status that is updated thru ipn when paypal thru IPN sends details of payment recd.

This modifies the data base and should be suficient enough to make out whether the payment was recd or not.

 

Satish

 

is this answer related to my question from previous post?

Share this post


Link to post
Share on other sites
I keep entering the email address for the paypal account and it doesn't save it. Its there a way to store the email address right into the php?

Check this thread.


Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Share this post


Link to post
Share on other sites
I can't find how the $sendto is buit.

The shipping address was grabbed from customers' sessions before v1.5(2.0), since the code moved to ipn.php, the sessions do not exist anymore. There is no $order->content_type because the $order is queried from database rather than $cart.

 

To fix it, you need to check the content type in ipn.php by adding some code to find out if there is any 'virtual' item in the order.


Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Share this post


Link to post
Share on other sites
Guest
The shipping address was grabbed from customers' sessions before v1.5(2.0), since the code moved to ipn.php, the sessions do not exist anymore. There is no $order->content_type because the $order is queried from database rather than $cart.

 

To fix it, you need to check the content type in ipn.php by adding some code to find out if there is any 'virtual' item in the order.

 

Hi Alex

 

This is the portion that builds the Paypal email. I still don't see where these $billto and $sendto are grabbed from...

 

in my paypal_ipn.php file (which is the one customized to work with auctionblox a quite complex ebay module), I have

// lets start with the email confirmation
  $email_order = STORE_NAME . "\n" .
				 EMAIL_SEPARATOR . "\n" .
				 EMAIL_TEXT_ORDER_NUMBER . ' ' . $order_id . "\n" .
				 EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $order_id, 'SSL', false) . "\n" .
				 EMAIL_TEXT_DATE_ORDERED . ' ' . strftime(DATE_FORMAT_LONG) . "\n\n";
  if ($order->info['comments']) {
	$email_order .= tep_db_output($order->info['comments']) . "\n\n";
  }
  $email_order .= EMAIL_TEXT_PRODUCTS . "\n" .
				  EMAIL_SEPARATOR . "\n" .
				  $products_ordered .
				  EMAIL_SEPARATOR . "\n";

  for ($i=0, $n=sizeof($order_totals); $i<$n; $i++) {
	$email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n";
  }

  if ($order->content_type != 'virtual') {
	$email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" .
					EMAIL_SEPARATOR . "\n" .
					tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n";
  }

  $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" .
				  EMAIL_SEPARATOR . "\n" .
				  tep_address_label($customer_id, $billto, 0, '', "\n") . "\n\n";

  if (is_object($$payment)) {
	$email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" .
					EMAIL_SEPARATOR . "\n";
	$payment_class = $$payment;
	$email_order .= $payment_class->title . "\n\n";
	if ($payment_class->email_footer) {
	  $email_order .= $payment_class->email_footer . "\n\n";
	}
  }

  tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

// send emails to other people
  if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
	tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
  }

 

and earlier in paypal_ipn, I added, where the $sql_data_array is built, after the first address lines:

 

 $sql_data_array = array(
'customers_id' => $customer_id,
...
'customers_street_address2' => $order->customer['street_address2'],
'delivery_street_address2' => $order->delivery['street_address2'],
'billing_street_address2' => $order->billing['street_address2'],
...
)

 

Thank you for your help

Share this post


Link to post
Share on other sites
Sorry I didn't notice that you modified paypal_ipn.php to handle the shipping address, not the v2.2 ipn.php.

 

$sendto and $billto are in customer's session data, created on load of checkout_shipping.php and checkout_payment.php. All you need to do is to declare the global $_SESSION variable, and access them via $_SESSION['sendto'] and $_SESSION['billto'].

Edited by AlexStudio

Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Share this post


Link to post
Share on other sites
Guest

lately i've been getting dozens of the "PayPal IPN Invalid Process" that look like this:

 

$_POST:

mc_gross=xx.xx
invoice=xx
payer_id=xx
address_street=1641 xx
payment_date=12:44:31 Mar 12, 2007 PDT
payment_status=xx
charset=windows-1252
address_zip=xx
first_name=James
mc_fee=-xx
address_country_code=US
address_name=xx
notify_version=2.1
reason_code=xx
custom=xx
business=paypal@xx
address_country=United States
address_city=xx
verify_sign=xxx
payer_email=xxx
parent_txn_id=xx
contact_phone=xx
txn_id=xx
payment_type=instant
last_name=xx
address_state=xx
receiver_email=xx@xxx
payment_fee=-xx
receiver_id=xx
mc_currency=USD
item_number=
residence_country=US
receipt_id=xx
payment_gross=xx
shipping=xx

$_GET:

 

the x's of course where the info is.

i haven't made any changes to this script and up until now it's been working smoothly, without sending me these invalid emails. anyone else experiencing this or know what's up?

Share this post


Link to post
Share on other sites
I'd be more than happy to know what these changes are. Please let me know.

Thanks a lot! :)

 

Hello everybody

 

After looking for hours in different forums, I am now requesting help.

Does anybody know how to make work together Paypal IPN 2.2 with QTpro 4.25 ???

 

I used the advices for Paypal IPN 1.x with QTpro 4.25 :

I tried to apply the modifications for checkout_process to paypal-ipn.php and ipn.php

 

The result is :

 

Orders without paypal : work perfectly

 

orders with paypal IPN :

- the items are not removed from the QTpro stock

- paypal payment is validated and received

- invoice email is sent to customer and admin

- if I delete the order (and click "restock item") the stock is incremented !! (so I can have a bigger stock than initially)

 

Anybody knows what to do ?

 

Thanks

Share this post


Link to post
Share on other sites
Guest

I've installed osCommerce PayPal IPN Module v2.2. and I'm testing it with Paypal Sandbox. Evertyhing work fine except recently.

 

When a I try to confirm an order , I receive an paypal error message

 

" This invoice has already been paid. For more information, please contact the merchant. "

 

I 've read the post discussed earlier. I follow the advice and place a few orders using cash payment method. so the order number did change. ( not the same order order nmber )I try again placing a new order an pay by Papal IPN. but I still the encounter the same problem.

 

any ideas, what should I check ?? appreciate if someone might help.

 

Regards

jason

Share this post


Link to post
Share on other sites

Hi all,

 

I'm having an issue with the PapPal IPN module. I'm running v2.2.

 

It seems that my script isn't responding to Paypal....at least as near as I can tell. Basically orders are getting processed in the cart, and I'm getting the payments in paypal just fine. Everything seems to be working, EXCEPT the status of the orders in OSC are not getting updates. They are all stuck on "Pending [Paypal IPN]".

 

So I went to do some testing and found a place to test your IPNs. http://www.eliteweaver.co.uk/testing/ipntest.php

 

It let's you put in the addy to your scrpit and will show you the results. When I run mine through it, it says that my script "Did not reply": Here's the output text:

 

============================================================================

Your simulated IPN has been sent successfully IPN Sent!

 

Your status report appears below:

 

IPN Creation Date: 11:09:01 Mar 15, 2007 PDT

IPN Expiration Date: 20:09:01 Mar 16, 2007 PDT

Send Count: 1

Target IPN Script: http://www.triskelionpublishing.com/bookst...pal_ipn/ipn.php

 

IPN Sent: 11:09:01 Mar 15, 2007 PDT

HTTP Status: HTTP/1.1 200 OK

IPN Received: Your script did not reply!

Post Back: N/A

 

Variables Sent: 61

Variables Expected: 62

Variables Received: 0

 

String Length Sent: 1433

String Length Expected: 1454

String Length Received: 0

 

Desired Response: VERIFIED

Actual Response: None

Intentional Response: No!

 

Summary: Your script is not posting back to us!

 

============================================================================

 

Here's the path to my script: http://www.triskelionpublishing.com/bookst...pal_ipn/ipn.php

 

 

I'm pretty much at my wits end on this. I have read through the docs and this forum and can find similar problems listed but no solutions. Nothing seems to match a script just not doing anything.

 

We do about 150 orders a day (all for ebooks available to download immediatly) and constantly checking the osc admin panel to update the orders by hand just doen't work.

 

I'd really appreciate any help anyone can offer. I'm happy to answer questions or provide more info.

 

Thanks in advance!

 

Justin Knupp

(jknupp)


Grand Canyon climate is greatly influenced by altitude, with lower elevations generally found to be warmer year round. The record high temperature was 99 °F (37 °C) in 2002, while the coldest temperature recorded is −66 °F (−54 °C) in 1933.[8] During the summer months of June through early September, daytime highs are normally in the 70 to 80 °F (21 to 27 °C) range, while nighttime lows can go to below freezing (0 °C)—especially at higher altitudes. Summer afternoons are frequently accompanied by thunderstorms. Spring and fall temperatures range between 30 and 60 °F (-1 and 16 °C) with cold nights in the teens to single digits (−5 to −20 °C). Winter in Grand Canyon is very cold with high temperatures usually between zero to 20 °F (−20 to −5 °C) and nighttime temperatures below zero °F (−20 °C) for most of the winter.[104]

 

Precipitation in Grand Canyon is highly variable and ranges from 15 inches (380 mm) annually near Mammoth Hot Springs, to 80 inches (2,000 mm) in the southwestern sections of the park. The precipitation of Grand Canyon is greatly influenced by the moisture channel formed by the Snake River Plain to the west that was, in turn, formed by Grand Canyon itself. Snow is possible in any month of the year, with averages of 150 inches (3,800 mm) annually around Grand Canyon Lake, to twice that amount at higher elevations.[104] http://www.grandcanyon-nationalpark.org/

 

Tornadoes in Grand Canyon are rare; however, on July 21, 1987, the most powerful tornado recorded in Wyoming touched down in the Teton Wilderness of Bridger-Teton National Forest and hit Grand Canyon National Park. Called the Teton–Grand Canyon tornado, it was classified as an F4, with wind speeds estimated at between 207 and 260 miles per hour (333 and 420 km/h). The tornado left a path of destruction 1 to 2 miles (1.6 to 3.2 km) wide, and 24 miles (39 km) long, and leveled 15,000 acres (6,100 ha; 23 sq mi) of mature pine forest.[105]

Share this post


Link to post
Share on other sites

Big thank you to Terra and AlexStudio for all your help trying to resolve my problem:

Turned out to be my fault entirely:

Whilst testing, I had my site password protected.

And, of course, PayPal's servers can't get passed a password challenge any more than an ordinary user can.

:blush:

Works just fine now.

Cheers

Alan

Share this post


Link to post
Share on other sites

Your ipn.php failed to post back to the test site. Please check in your ipn.php and see what server url is set in there. If you didn't modify the $server variable, the ipn testing won't work beacuse it was posting back to the paypal server rather then the testing site.

 

If you have the $server url setup correctly but it still doesn't post back, your server couldn't establish a connection to the test site via port 443 nor port 80, and your server doesn't have curl lib installed. You need to check with your host.


Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Share this post


Link to post
Share on other sites
" This invoice has already been paid. For more information, please contact the merchant. "

Please find your answer in Known issues section of the install guide.


Super Download Shop, PayPal Express Checkout IPN, Selling Downloads, Visual Validation (preventing robotic flood), phpBB2 Integration

 

Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.

Share this post


Link to post
Share on other sites
Guest
Please find your answer in Known issues section of the install guide.

 

thanks Alex . I gusses you were referring to

 

" Duplicate order IDs - If you have more than one shop linked to your PayPal account, then you should set your PayPal profile not to check for duplicate orders. " at the know Issues .......

 

I'm afraid I've got only one store linked .

 

no problem, the problem gone after I delete all the previous order.

 

in any case, thanks for your help, alex.

 

I will test it again.

 

Regards

jason

Share this post


Link to post
Share on other sites

Jason - if you deleted all orders and are starting with order 1, then you may face the same problem again in the future. PayPal stores all order ids ever submitted by your shop so if you are altering the order id (going back) then that can cause the same problems as having multiple shops once you reach the order numbers you've already submitted.

 

A safe way is to go forward to an order id which has never been used e.g. 1000 or 10000 .. whatever is appropriate for your shop. 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 **

Share this post


Link to post
Share on other sites
Guest
Jason - if you deleted all orders and are starting with order 1, then you may face the same problem again in the future. PayPal stores all order ids ever submitted by your shop so if you are altering the order id (going back) then that can cause the same problems as having multiple shops once you reach the order numbers you've already submitted.

 

A safe way is to go forward to an order id which has never been used e.g. 1000 or 10000 .. whatever is appropriate for your shop. all the best - Terra

 

Thanks Terra . To change the order number , Should I do it by editing the Order_ID value ?

Share this post


Link to post
Share on other sites
Guest

i'm sorry I've got another problem with the confirmation email . The country name could not be displayed in the store's order confirmaiton email correctly. Only the first letter of the country was shown. It happens when Paypal payment was selected. For cash payment, the email looks o.k. the country name could be displayed courectly.

 

any idea if I might mess up something ?? what should I check ? appreciate if someone may help.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×