Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Official PayPal IPN Support Thread


Mark Evans

Recommended Posts

I am having one problem. I am testing with the sandbox and everything is working fine with physical products, all the fields are prepopulated on paypal and everything gets updated, etc.

 

But, if the person is trying to buy a downloadable product, none of the paypal fields get prepopulated. Even though there is no delivery, they still need name, address, etc for biling purposes.

 

Can you tell me what I need to tweak to get the paypal fields to populate for downloadable products?

 

Thanks!

Rachel

Link to comment
Share on other sites

Anyone??

 

Seriously looking at other carts now...

 

Lonote

 

 

Can someone please help me with this, before I go right off osCommerce altogether??

 

I am using:

osCommerce 2.2MS2

Paypal IPN v2.2

 

I have been trying to fix this problem for weeks now, and have finally given up. I feel that I just need to tick a box somewhere, but can I find the box...??!??!

 

The problem is thus - I have set up IPN and made a test purchase on the live Paypal server. A few things happened, which I know someone will be able to help me with.

 

1) - When I (as the customer) was taken to Paypal, the order total was set to £0.00, and I had to change it manually. Obviously not good.

2) - the email I (as the customer) received from paypal did not list the items ordered - under "order description" it just gave the name of the website I ordered them from.

3) - the email I (as the site owner) received also didn't list the order details - just gave the site name.

4) - the email I (as the web designer) received was the error message that begins

 

$_POST:

 

mc_gross=1.45

invoice=52

address_status=confirmed

payer_id=5LWZJEN5C2RBS

tax=0.00

Any help would be VERY much appreciated. I have searched the forums to no avail, particularly for the solution to the order total and order details problems.

 

Thanks

Lonote

Link to comment
Share on other sites

Anyone??

 

Seriously looking at other carts now...

 

Lonote

 

Have you altered the checkout_process.php in anyway? If so you have to make the changes to the paypal files as well or it won't work. Try using the Developers sandbox for testing instead of the live server until you have all your problems resolved.

Currently running 76 contibutions.

Link to comment
Share on other sites

I am having one problem. I am testing with the sandbox and everything is working fine with physical products, all the fields are prepopulated on paypal and everything gets updated, etc.

 

But, if the person is trying to buy a downloadable product, none of the paypal fields get prepopulated. Even though there is no delivery, they still need name, address, etc for biling purposes.

 

Can you tell me what I need to tweak to get the paypal fields to populate for downloadable products?

 

Thanks!

Rachel

 

I read somewhere that if your going to use this version of paypal with downloads, it's best to use the Downloads Controller contrib. I wish I could remember where I read that at?

 

If your not already using it, it might be worth a try.

Currently running 76 contibutions.

Link to comment
Share on other sites

Concerning the encoding subject that has been discussed and the "You have entered unsupported characters for this field. Current available language character types are: European, Chinese, Korean, Japanese, and Thai. Please try again." error, i have found a working solution.

 

It took me some time, lots of searching and testing but i finnaly found a solution for this problem (at least it works for me.

 

STEP 1

 

in includes/functions/general.php add

 

function tsy_paypaltr($var)
{
// a single accentuated/special character matches a single non acc/spec character:
$var = strtr($var, "ŠŽŸÀÁÂÃÅÇÈÉÊËÌÍÎÏÐÑÒÓÔÕØÙÚÛÝÞ", "SZYAAAAACEEEEIIIIDNOOOOOUUUYP");
$var = strtr($var, "šžÿàáâãåçèéêëìíîïðñòóôõøùúûýþµ", "szyaaaaaceeeeiiiidnooooouuuypu");
// a single accentuated/special character matches a couple of non acc/spec character:
$var = str_replace("Œ", "OE", $var);
$var = str_replace("Æ", "AE", $var);
$var = str_replace("œ", "oe", $var);
$var = str_replace("æ", "ae", $var);
return $var;
}

 

feel free to add, remove or change the chars being replaced.

 

STEP 2

 

in includes/modules/payment/paypal.php around line 481 change

 

while (list($key, $value) = each($parameters)) {
         echo tep_draw_hidden_field($key, $value);

 

to

 

while (list($key, $value) = each($parameters)) {
         echo tep_draw_hidden_field($key, tsy_paypaltr($value));

 

 

And that's it, no more error. I hope this works for everyone else with the same problem.

Link to comment
Share on other sites

Hi all - I have the Paypal IPN module installed. I recently edited the checkout_process.php file to add the email address and telephone number of the customer to the order confirmation email - and the additional comments box (we're using it as a field for the customer to write a message in) has stopped working completely - something may have been deleted or i'm conflicting something.

 

It retains the contents of the box all the way up to the point where you go to paypal (e.g. you can see the text in the order summary and so on) - but the text just doesnt get added to the confirmation email, or appear in admin on the order description/invoice. Then the store owner has to ring and ask what their message was......

 

Could anyone look at my checkout_process.php code? Which file would it be - the one found in the catalog root, or the one in the includes - modules - payment - paypal_ipn folder?

 

any help would be most appreciated - i'm a bit desperate.

Link to comment
Share on other sites

Hi all - I have the Paypal IPN module installed. I recently edited the checkout_process.php file to add the email address and telephone number of the customer to the order confirmation email - and the additional comments box (we're using it as a field for the customer to write a message in) has stopped working completely - something may have been deleted or i'm conflicting something.

 

It retains the contents of the box all the way up to the point where you go to paypal (e.g. you can see the text in the order summary and so on) - but the text just doesnt get added to the confirmation email, or appear in admin on the order description/invoice. Then the store owner has to ring and ask what their message was......

 

Could anyone look at my checkout_process.php code? Which file would it be - the one found in the catalog root, or the one in the includes - modules - payment - paypal_ipn folder?

 

any help would be most appreciated - i'm a bit desperate.

 

I believe the file you need to modify is the ipn.php not the checkout_process.php because this file is bypasses by this contribution.

Troy Wilson

Keepsake-storybooks.com

Link to comment
Share on other sites

IPM.PHP - nothing happens. Lost connection with database

 

I figured out, that for some reason the connection is lost and it seemed that I did not get notiication from PayPal. I moved the following lines

 

  chdir('../../../../');
 require('includes/application_top.php');
 include(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_PROCESS);

after

 

    $result = curl_exec($ch);
 curl_close($ch);
 }

 

and everything started working. There is no any call to the database before.

Link to comment
Share on other sites

Does anybody knows why the name for the customer's phone is 'H_PhoneNumber'? It's a mandatory field and it's blank? I added the following code

$removed = array ('(', ')', ' ', '.', '-');
$phone_xx = str_replace ($removed, '', $order->customer['telephone']);

if( strlen ($phone_xx) == 10 ) {
 $parameters['night_phone_a']	= substr ($phone_xx, 0, 3);	//  H_PhoneNumber
 $parameters['night_phone_b'] 	= substr ($phone_xx, 3, 3);
 $parameters['night_phone_c'] 	= substr ($phone_xx, 6, 4);
}

and the phone is displayed on the page from PayPal. What's the original idea was? Does anybody have more elegant soolution to handle the phone number? It could be: (XXX) YYY-ZZZZ, or XXXYYYZZZZ, or XXX.YYY.ZZZZ, etc.

Link to comment
Share on other sites

hi can anyone help... I installed the module and it all looked fine I added the test info and clicked update... and this is what I got... can anyone help ?

 

Internal Server Error

 

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

 

More information about this error may be available in the server error log.

 

 

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Link to comment
Share on other sites

Thanks tkw829.

 

Is anyone okay for me to send them the paypal_ipn.php file? The issue is that additional comments are getting ignored by admin and email - not processing with the order, and shop keeper is resorting to ringing the customer to find out what their comments were.

Link to comment
Share on other sites

Is anyone okay for me to send them the paypal_ipn.php file? The issue is that additional comments are getting ignored by admin and email - not processing with the order, and shop keeper is resorting to ringing the customer to find out what their comments were.

 

 

If you check the install instructions on the paypal contibution you will see it says that any changes you make to the checkout_process.php you need to make to the paypal contrib. If the changes you made involved the email section of checkout_process.php, then you need to make those changes to ipn.php for the latest version of this contrib. If your using an older version < 2.0 then you would make the change on paypal_ipn.php.

 

Hope this helps

Edited by candleman

Currently running 76 contibutions.

Link to comment
Share on other sites

  1. Could anybody say why the billing information (name, address) is populated with delivery one?
  2. If the oprion 'Force shipping address' is 'false' the shipping address is not send from the store to the PayPal? It sounds more like to let the customer edit Shipping Addres or not. Could anybody say if I'm wrong?
  3. If the oprion 'Force shipping address' is 'true' the Billing Information is blank? Why?

Could somebody or author (Terra) give some extra information about this? Please...

Link to comment
Share on other sites

If you check the install instructions on the paypal contibution you will see it says that any changes you make to the checkout_process.php you need to make to the paypal contrib. If the changes you made involved the email section of checkout_process.php, then you need to make those changes to ipn.php for the latest version of this contrib. If your using an older version < 2.0 then you would make the change on paypal_ipn.php.

 

Hope this helps

 

hi, it was the version just before this new one was released. My checkout_process and paypal_ipn files are identical, i make sure i hit both files to be safe - it previously did work but it's decided to stop working - and i really can not put my finger on the reason why.

Link to comment
Share on other sites

I actually do have an ipn file, but i've never touched this - i'm not sure how it affects my issue to be honest. Does it have an impact on the comments field coming through?

Link to comment
Share on other sites

hi, it was the version just before this new one was released. My checkout_process and paypal_ipn files are identical, i make sure i hit both files to be safe - it previously did work but it's decided to stop working - and i really can not put my finger on the reason why.

 

Let me see if I get this straight..before you added the fields to the checkout Process everything worked as it should? If you have another form of payment, do the comments get passed when that method is used? Was adding the fields some contribution or was it your own doing?

Currently running 76 contibutions.

Link to comment
Share on other sites

  1. Could anybody say why the billing information (name, address) is populated with delivery one?
  2. If the oprion 'Force shipping address' is 'false' the shipping address is not send from the store to the PayPal? It sounds more like to let the customer edit Shipping Addres or not. Could anybody say if I'm wrong?
  3. If the oprion 'Force shipping address' is 'true' the Billing Information is blank? Why?

Could somebody or author (Terra) give some extra information about this? Please...

This has been discussed in this thread. I don't want to say anything about it anymore.

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.

Link to comment
Share on other sites

If i use a different contribution e.g cash on delivery, it all works.

 

I changed the code in the email confirmation area of paypal_ipn.php to pull through the email address and telephone number, and since the comments has stopped working. This is the only area of code i've tampered with. It came off of a recommendation I found in another thread:

 

// lets start with the email confirmation
 $email_order = STORE_NAME . "\n" . 
			 EMAIL_SEPARATOR . "\n" . 
			 EMAIL_TEXT_ORDER_NUMBER . ' ' . $insert_id . "\n" .
			 EMAIL_TEXT_INVOICE_URL . ' ' . tep_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $insert_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 . "\nemail: " .$order->customer['email_address']. "\nTelephone: ".$order->customer['telephone']."\n".
			   tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n";
}

if(isset($_SESSION["shipdate"]))$email_order.="\n" . EMAIL_TEXT_ARRIVAL_DATE . "\n" .
 EMAIL_SEPARATOR . "\n" . 
	 date("l, F j, Y",$_SESSION["shipdate"]) . "\n\n";

 $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" .
			 EMAIL_SEPARATOR . "\nemail: " .$order->customer['email_address']. "\nTelephone: ".$order->customer['telephone']."\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);

 

I can publish other bits if it helps.

Link to comment
Share on other sites

After a order is completed with paypal IPN im getting products with a total stock level of 0 being turned off.

 

 

I have change checkout_process.php to stop out of stock item being disabled which works with all payment apart from paypal IPN

 

Does any one know a way to stop this happening.

 

Thanks

Link to comment
Share on other sites

I've installed osCommerce PayPal IPN Module v2.2 For 2.2MS2 by Terra which seemed to be the latest full release. Everything is working apart from order emails are not sent out and the order status remains at Preparing [PayPal IPN] forever.

 

Is this a common problem?

Link to comment
Share on other sites

I was away for quite sometime and now back at work..

 

I'm still struggling to understand if this is normal. each time I make an order paid with IPN via the testing server I get this error email sent

 

Subject PayPal IPN Invalid Process

 

 

$_POST:

 

txn_type=web_accept

payment_date=04:46:44 May 06, 2007 PDT

last_name= las name

residence_country=NL

pending_reason=unilateral

item_name=the Gathering webshop

payment_gross=

mc_currency=EUR

payment_type=instant

verify_sign=ABkf-Fki.z9qZvQYNep-9SIEQzAVARfvpw4TD3dvcRHcnxGld1rqnopf

payer_status=unverified

test_ipn=1

tax=0.00

[email protected]

txn_id=0

quantity=1

[email protected]

first_name=ALex

invoice=G43

payer_id=Z5V2HMPWTLM46

item_number=

payment_status=Pending

shipping=0.00

mc_gross=6.35

custom=2

charset=windows-1252

notify_version=2.1

 

$_GET:

 

the order appears in the admin pannel as preapring Paypal IPN

 

On sandbox.paypal.com I can see the following lines per order

 

Payment To [email protected] 6 May 2007 Unclaimed Details Cancel -€24,65 EUR €0,00 EUR

Transfer From Credit Card 6 May 2007 Completed Details €24,65 EUR €0,00 EUR

 

so I guess this is working.. why do I get this email then??

 

My account accept EUR as default and this is the only currency of the shop.

 

Cheers

Link to comment
Share on other sites

After a order is completed with paypal IPN im getting products with a total stock level of 0 being turned off.

 

I have change checkout_process.php to stop out of stock item being disabled which works with all payment apart from paypal IPN

 

Does any one know a way to stop this happening.

 

I have the same problem. I never carry anything in stock with a quantity greater than 1 and when a PayPal purchase is made...and the stock drops to zero...the item is being 'turned off' from view in the website. Only happens with PayPal purchases, though...not other payment modules.

 

I'm using a contrib called Display Out Of Stock or something like that (I forget)...and I'd really like to figure out how to stop these items from 'disappearing' from the website after a PayPal payment is made. If it matters, I'm using IPN 1.1.

 

Also...why is it that every single PayPal payment I receive has to be manually accepted or denied within PayPal? And, when I click to Accept the payment...I'm being told that every single one of these buyers is using an Unconfirmed Address. That just cannot be possible. Some of the people who buy from my website also buy from me in 'other venues' and their PayPal payments/addresses are always Confirmed....just not when the buy from my website.

 

Then, when I use PayPal to create shipping labels...I have to manually fill in their name, address, etc. I get no prefilled shipping information whatsoever. Is this the way it's supposed to work?

Link to comment
Share on other sites

Great mod,

 

However, upon being directed to PayPal for processing payment. Shipping isnt added to the desired section. For exampl.My product costs $20 and shipping is $2.95. On paypal the total is correct at $22.95 but it shows a colum as shipping at $0.00. The shipping is added to the item total.

 

Any ideas?

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.

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...