Jump to content
Mark Evans

Official PayPal IPN Support Thread

Recommended Posts

Oops, typo sorry! The line should be:
		  $email_body .= $key . '=' . $value . "\n";

Please try again.


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
Are you using the PayPal IPN module came with the osCommerce 2.2RC1 package?

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

Alex,

 

Having edited the debug code I can complete a checkout to the paypal page (obviously no change to the original problem), however no e-mail is being sent to the address listed for my store (primary e-mail that orders go to).

 

I have tried on several occasions and I have checked the mail server for lag-time. I should have received it if it had sent successfully.

Edited by pegasus_paradox

------------------------------------------------------------------------------------------------------------------------------

Share this post


Link to post
Share on other sites
You need to setup the debug email in PayPal IPN settings.

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
Please test with the flat rate shipping module, if the shipping cost is included at PayPal, then it could be your USPS shipping module which has not been setup correctly.

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 need more clues to solve this PayPal IPN v2.3 error message "PayPal system contains an incorrectly formatted packing value" issue.

 

Here is a debug code add-on, which is to dump the parameters sent within the button code into debug email. Warning!! This debug code will put order details in email without any protection. Apply this debug code only if you want to help solving the above issue, and it shall be removed after the problem sovled.

 

Find in catalog/includes/modules/payment/paypal_ipn.php around line 520:

		unset($data);
  } else {
	while (list($key, $value) = each($parameters)) {
	  echo tep_draw_hidden_field($key, $value);
	}
  }

  return $process_button_string;
}

Replace with:

		unset($data);
  } else {
	reset($parameters);
	while (list($key, $value) = each($parameters)) {
	  $process_button_string .= tep_draw_hidden_field($key, $value);
	}
  }
// BOF debug code
  if (tep_not_null(MODULE_PAYMENT_PAYPAL_IPN_DEBUG_EMAIL)) {
	reset($parameters);
	$email_body = '';
	while (list($key, $value) = each($parameters)) {
	  $email_body .= .= $key . '=' . $value . "\n";
	}
	tep_mail('', MODULE_PAYMENT_PAYPAL_IPN_DEBUG_EMAIL, 'PayPal IPN Parameters Dump', $email_body, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
  }
// EOF debug code
  return $process_button_string;
}

That's it.

 

Please post in this thread the problematic parameters sent to you, with personal info removed.

Hi Alex, these are the parameters I get emailed to me after I have added your debug code:

 

cmd=_ext-enter

redirect_cmd=_xclick

item_name=Just-twins

amount=15.35

shipping=4.00

handling=-0.36

business=rob.se_1191838131_biz@education.tas.gov.au

address_override=1

no_shipping=2

night_phone_b=0345454545

first_name=Rob

last_name=Buyer

address1=24 Marvyn St

address2=Nowhere

city=Hobart

zip=7008

state=TAS

country=AU

email=rob.bu_1191838281_per@education.tas.gov.au

currency_code=AUD

invoice=32

custom=5

no_note=1

notify_url=http://www.just-twins.com.au/ext/modules/payment/paypal_ipn/ipn.php

cbt=Complete your Order Confirmation

return=http://www.just-twins.com.au/checkout_process.php

cancel_return=http://www.just-twins.com.au/checkout_payment.php

bn=osCommerce PayPal IPN v2.1

lc=AU

 

Regards Rob.

Share this post


Link to post
Share on other sites

Alex,

 

Oops...

cmd=_cart

upload=1

item_name_1=item name

item_number_1=item7

amount_1=63.82

tax_1=11.17

quantity_1=1

shipping_1=0.00

handling_1=-11.17

amount=74.99

business=sales@website.com

address_override=1

no_shipping=2

night_phone_b=0123 4545 111

first_name=test

last_name=name

address1=1234 drive

address2=

city=London

zip=90210

state=LOND

country=GB

email=address@web.com

currency_code=GBP

invoice=11

custom=13

no_note=1

notify_url=http://www.website.com/ext/modules/payment/paypal_ipn/ipn.php

cbt=Complete your Order Confirmation

return=http://www.website.com/checkout_process.php

cancel_return=http://www.website.com/checkout_payment.php

bn=osCommerce PayPal IPN v2.1

lc=GB

handling_1 is dodgy. It mirrors the tax_1 but with a - before it. When I remove the VAT from the same item and checkout they both show at 0 (no minus sign)

 

No product with ANY VAT, pre or post adding this contribution works for me. It only works when the product is priced at 0.01 in which case the tax_1 shows at 0.00 and the handling_1 shows at -0.00. Clearly a bad test on my part last time, but interesting to find that it works at -0.00 and not -'any other amount'.

 

Next with aggregated cart (and move tax to total)

cmd=_ext-enter

redirect_cmd=_xclick

item_name=Store Name

amount=86.16

shipping=0.00

handling=-11.17

business=sales@website.com

address_override=1

no_shipping=2

night_phone_b=0123 4545 665

first_name=test

last_name=name

address1=1234 drive

address2=

city=London

zip=e15lp

state=LOND

country=GB

email=name@shopperhotmail.com

currency_code=GBP

invoice=11

custom=13

no_note=1

notify_url=http://www.website.com/ext/modules/payment/paypal_ipn/ipn.php

cbt=Complete your Order Confirmation

return=http://www.website.com/checkout_process.php

cancel_return=http://www.website.com/checkout_payment.php

bn=osCommerce PayPal IPN v2.1

lc=GB

Notice the Handling fee at -11.17.

I hope these are enough details.

Edited by pegasus_paradox

------------------------------------------------------------------------------------------------------------------------------

Share this post


Link to post
Share on other sites

I see the problem now, please stop posting the parameters without removing personal info.


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

Hi guys,

 

I appologize if this thread has already answered this problem, but I have been unable to find any help for this particular problem.

 

http://www.spycitystore.com/ is the website.

Anywho.. the system is in debug mode so feel free to make an account and attempt to check some stuff out.. ull notice the problem occuring at the

 

checkout_payment.php stage when the page is supposed to redirect to the confirmation page with full check out details but instead just redirects back to same page.

 

Now after doing some more testing I do also notice that sometimes it does work. But sometimes it does not also. I have tried 2 of the mainstreem browsers (ie, firefox) and the problem seems to be reproducting in both browsers.

 

The shoping cart works, so cookies are obviosly working, but I am a little confused as to if this problem is caused by the paypal module or the system itself?

 

I did find one unanswered post also :

 

http://forums.oscommerce.com/lofiversion/i...hp?t186891.html

Share this post


Link to post
Share on other sites

Hmm, Ive been poking around a little more and im really starting to wonder what is changing between attempts to continue past the payment information to confirmation page. Sometimes even just going back after a succesful submission to try and submit it again will cause the system to fail to advance to the next page but the kicker is no less then a few seconds before it was working. I am wondering if possibly a configuration issue with the administrative panel is the problem.. anybody got any ideas?

Share this post


Link to post
Share on other sites

osCommerce PayPal IPN Module v2.3.1 For 2.2MS2 released. Download here.

  • Bug fix - In v2.3 when "Display Prices with Tax" set to true under admin configurations, the handling amount become negative and causes the error message "PayPal system contains an incorrectly formatted packing value" issue. Fixed by adding a configuration key checking when calculating handling amount.
  • Bug fix - In v2.3 The shipping/handling amount could have discrepancies when 'Per Item' mode selected. Re-wrote the shipping/handling calculation so the amounts are now accurate.
  • Bug fix - If the order content type is 'virtual', the customer's billing address should be sent to PayPal instead of the delivery address.
  • Added post v2.2 multi-language support fix by Terra.
  • Added 'Per Item' mode supported when Encrypted Web Payments is enabled.


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
Actually i have checked and curl support is enabled on my server

 

CURL support enabled

CURL Information libcurl/7.15.3 OpenSSL/0.9.7a zlib/1.2.1.2 libidn/0.5.6

so that is not the problem then. I have switched over to the live Paypal now too, still same result so the order goes through okay I just never get the update to say the order has been paid it just says as Preparing [PayPal IPN].

I dont get debug emails either, but given the payment process actually works i have left it live now on the store for people to use, i will just manually update the process after i get the email ntoification from paypal.

 

Still do want to get it integrated properly though so if anyone has any ideas please let me know.

 

Just an update for anyone interested, looks like just a delay issue, I thought that the order should be updated straight away when the user confirms payment or returns to store, but i guess it happens asynchronously. i noticed after some time that the status was updated so all good.

Share this post


Link to post
Share on other sites
osCommerce PayPal IPN Module v2.3.1 For 2.2MS2 released. Download here.
  • Bug fix - In v2.3 when "Display Prices with Tax" set to true under admin configurations, the handling amount become negative and causes the error message "PayPal system contains an incorrectly formatted packing value" issue. Fixed by adding a configuration key checking when calculating handling amount.
  • Bug fix - In v2.3 The shipping/handling amount could have discrepancies when 'Per Item' mode selected. Re-wrote the shipping/handling calculation so the amounts are now accurate.
  • Bug fix - If the order content type is 'virtual', the customer's billing address should be sent to PayPal instead of the delivery address.
  • Added post v2.2 multi-language support fix by Terra.
  • Added 'Per Item' mode supported when Encrypted Web Payments is enabled.

 

Please excuse the double post, thought best to ask my question in this support thread.

 

I have just installed Paypal IPN 2.3 and have the same question. From looking at the fix file provided with CCGV(trad) I have been able to merge all of the suggested changes but one, would it be correct that if one could find the equivalent code in 2.3 that I should be able to add the same update as Vger has provided or is that too simple.

 

*************************************************

 

find this code:

 

//------insert customer choosen option eof ----

 

$total_weight += ($order->products[$i]['qty'] * $order->products[$i]['weight']);

 

$total_tax += tep_calculate_tax($total_products_price, $products_tax) * $order->products[$i]['qty'];

 

$total_cost += $total_products_price;

 

$products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . $products_ordered_attributes . "\n";

 

}

 

and below add this:

 

$order_total_modules->apply_credit();// CCGV

 

*************************************************

Share this post


Link to post
Share on other sites

Thanks Alex,

 

'Transaction Type: Per Item' with 'Move tax to total amount: False' works great now :D

 

I have not tested any other combination yet...

Thanks for solving and updating so quickly!


------------------------------------------------------------------------------------------------------------------------------

Share this post


Link to post
Share on other sites
v2.3 doesn't support CCGV. The modification you mentioned is for v1.x only.

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

Hi AlexStudio,

I installed v2.3.1 on my 2.2MS2, but when i'm arrive on Paypal site, i have this message: "You have entered unsupported characters for this field. Current available language character types are: European, Chinese, Korean, Japanese, and Thai. Please try again."

I think it's because i have special chars (french products whit accents) in my items name.

Is it possible, and where, to filter this special char ? For example we can transform them whitout accents.

Thanks in advance for your answer.

Regards,

Jerome

Share this post


Link to post
Share on other sites

After I added the paypal IPN module my best sellers list stopped updating. Is there a way to fix this? Thanks. Please PM me if you have a solution.

Share this post


Link to post
Share on other sites
Hi AlexStudio,

I installed v2.3.1 on my 2.2MS2, but when i'm arrive on Paypal site, i have this message: "You have entered unsupported characters for this field. Current available language character types are: European, Chinese, Korean, Japanese, and Thai. Please try again."

I think it's because i have special chars (french products whit accents) in my items name.

Is it possible, and where, to filter this special char ? For example we can transform them whitout accents.

Thanks in advance for your answer.

Regards,

Jerome

I have special chars in account Name (Billing adress without these, as on card) and same message on paypal. But with this message is possible pay and complete order (on sandbox). So I also interested in filter for transcoding names, items and remove special characters (like ąčęėįšųūž)

 

I have tested v.2.2 and v.2.3


Kestas

Share this post


Link to post
Share on other sites
osCommerce PayPal IPN Module v2.3.1 For 2.2MS2 released. Download here.
  • Bug fix - In v2.3 when "Display Prices with Tax" set to true under admin configurations, the handling amount become negative and causes the error message "PayPal system contains an incorrectly formatted packing value" issue. Fixed by adding a configuration key checking when calculating handling amount.
  • Bug fix - In v2.3 The shipping/handling amount could have discrepancies when 'Per Item' mode selected. Re-wrote the shipping/handling calculation so the amounts are now accurate.
  • Bug fix - If the order content type is 'virtual', the customer's billing address should be sent to PayPal instead of the delivery address.
  • Added post v2.2 multi-language support fix by Terra.
  • Added 'Per Item' mode supported when Encrypted Web Payments is enabled.

After I changed from v2.2 to this v2.3.1 I got tax (VAT) added twice, so orders total bigger on paypal, than on store. Calculation was good on v2.3. Others settings no change when update from v2.2 to v2.3.1


Kestas

Share this post


Link to post
Share on other sites
Aren't French characters included in Euopean? I'll dig into the PayPal documents for this.

 

hmm, didn't notice this before. I'll check the code and see what went wrong. Please check in this thread for updates.

 

It seems to me that the tax problem is more trickier than I thought. However, there is already a new solution available.

 

I'll try to fix all these 3 problems and upload a new package v2.3.2 to the add-on area.


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've checked the code and found out that the best sellers updating code is located in ipn.php under ext directory. If your best sellers list does not update, most likely you have a problem receiving IPN calls. Check if you can access ipn.php via internet browser, and make sure you have register globals on in that directory. Also make sure your server has cURL lib installed (PHP>4.3), or your store has SSL enabled. IPN won't work if you don't have any of these.

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
After I changed from v2.2 to this v2.3.1 I got tax (VAT) added twice, so orders total bigger on paypal, than on store. Calculation was good on v2.3. Others settings no change when update from v2.2 to v2.3.1

This problem is only when Transaction Type: Aggregate

No problem with total calculation when Transaction Type: Per Item


Kestas

Share this post


Link to post
Share on other sites

I have a security issue...

 

I've noticed that somehow people are paying for their orders without going through the checkout process - including shipping calculations. Paypal correctly receives the customer number, and invoice ID, and shopping cart items.

 

When i 'borrowed' the person's account, the items they ordered were still in the shopping cart.

 

Any ideas how this happens? Or what i can do to prevent it?

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

×