Jump to content



Photo
* * * * * 1 votes

PayPal Express Checkout IPN Payment Module


  • Please log in to reply
405 replies to this topic

#381   vjren

vjren
  • Members
  • 14 posts
  • Real Name:Rene

Posted 16 July 2008 - 20:29

G'Day

I came up with a different fix - simply change the handling and tax to $0.00 it works with our set up as our items are tax inclusive anyway. Not a single complaint so far.

Just a mater of changing the tax and handling values to 0.00


$tx_total = 0.00;
$ha_toatl = 0.00;

That is the easy route yes, but it looks a little more professional when Items are specified.
Just some good support from paypal would be nice to figure this one out.

Anyway, it works, just the warning is not so nice.

#382   Dennisra

Dennisra
  • Members
  • 515 posts
  • Real Name:Joseph D. Jefferson
  • Gender:Male

Posted 24 July 2008 - 20:10

I have the same problem as well. Just started out of nowhere yesterday. Buyers cannot complete a purchase with PayPal.

In function: before_process()
Response from PayPal:

[Security] = N/A
[RequesterCredentials]
[0]
[Credentials]
[0]
[Username] = N/A
[Password] = N/A
[Subject] = N/A

[DoExpressCheckoutPaymentResponse]
[0]
[Timestamp] = 2008-07-24T17:33:21Z
[Ack] = FailureWithWarning
[CorrelationID] = a806252b44ca
[Errors]
[0]
[ShortMessage] = Invalid Data
[LongMessage] = Handling total is invalid.
[ErrorCode] = 10428
[SeverityCode] = Error

etc. etc.

What is the fix?

#383   miamizx

miamizx
  • Members
  • 61 posts
  • Real Name:Oliver
  • Gender:Male
  • Location:Miami

Posted 24 July 2008 - 20:49

I just recently noticed that after I confirm the payment at the paypal site the system redirects me back to the Payment Information page instead of the Confirmation page (where the blue purchase button is), is this an error on my cart or is this supposed to be this way?

#384   AlexStudio

AlexStudio
  • Members
  • 1,092 posts
  • Real Name:Alex Li
  • Gender:Male
  • Location:Taipei, Taiwan

Posted 25 July 2008 - 02:46

Apparently PayPal changed their server behavior so the negative value is no longer accepted. For the time being please tweak your osCommerce setting 'Display TAX with Price' to work around the problem. I'll make a fix for this change when I get time.
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.

#385   cpb72

cpb72
  • Members
  • 1 posts
  • Real Name:sand

Posted 09 August 2008 - 14:39

Hi AlexStudio,

The same problem for me :

Error #1: Invalid Data (10428)
Handling total is invalid.

Error #2: Transaction refused because of an invalid argument. See additional error messages for details. (10413)
The totals of the cart item amounts do not match order amounts.

I changed the $ha_toatl in paypal_ec.php but nothing work at all, always the same error message.

I sent a ticket to paypal, no answer so far...

The behaviour of their server is completly weird because the error message appears when you try to pay with credit card within creating a paypal account.

If you log in with your paypal account to pay, and the account is verified and has credit, the transaction is successfull (no error message).

It's not very nice, because most of the time customers don't have paypal account, so they have an error, and they can't buy.

When you'll have a fix it would be very helpfull.

Thank you very much,

#386   Dennisra

Dennisra
  • Members
  • 515 posts
  • Real Name:Joseph D. Jefferson
  • Gender:Male

Posted 21 August 2008 - 21:41

"[LongMessage] = The totals of the cart item amounts do not match order amounts."

Does anyone know if there has been a fix for the above error from PayPal?

#387   uksitebuilder

uksitebuilder
  • Members
  • 11 posts
  • Real Name:Simon Powers

Posted 23 August 2008 - 15:47

A new error I got today

> In function: pre_confirmation_check()
> Response from PayPal:
>
> [Security] = N/A
> [RequesterCredentials]
> [0]
> [Credentials]
> [0]
> [Username] = xxxx.com
> [Password] = XXXXXXXXXXXXXXXX
> [Subject] = N/A
>
> [faultcode] = SOAP-ENV:Client
> [faultstring] = XML syntax error

#388   Dennisra

Dennisra
  • Members
  • 515 posts
  • Real Name:Joseph D. Jefferson
  • Gender:Male

Posted 15 September 2008 - 01:57

BODY {font-family="Tahoma"} TT {font-family="Courier"} BLOCKQUOTE.CITE {padding-left:0.5em; margin-left:0; margin-right:0; margin-top:0; margin-bottom:0; border-left:"solid 2";} Has anyone had experience with this error. Is there a fix available?
"The totals of the cart item amounts do not match order amounts."

In function: before_process()
Response from PayPal:

[Security] = N/A
[RequesterCredentials]
[0]
[Credentials]
[0]
[Username] = N/A
[Password] = N/A
[Subject] = N/A

[DoExpressCheckoutPaymentResponse]
[0]
[Timestamp] = 2008-09-14T06:24:15Z
[Ack] = FailureWithWarning
[CorrelationID] = 2fd540f051c55
[Errors]
[0]
[ShortMessage] = Invalid Data
[LongMessage] = Handling total is invalid.
[ErrorCode] = 10428
[SeverityCode] = Error

[1]
[ShortMessage] = Transaction refused because of an invalid argument. See additional error messages for details.
[LongMessage] = The totals of the cart item amounts do not match order amounts.
[ErrorCode] = 10413
[SeverityCode] = Warning

[Version] = 2.0
[Build] = 690663
[DoExpressCheckoutPaymentResponseDetails]
[0]
[PaymentInfo]
[0]
[TransactionType] = none
[PaymentType] = none
[PaymentStatus] = None
[PendingReason] = none
[ReasonCode] = none

From this request: (WARNING!!) DO NOT expose your API Username/Password to the public!!

[?xml version="1.0" encoding="utf-8"?]
[soap:Envelope xmlns:soap="http://schemas.xmlso...soap/envelope/" xmlns:xsi="http://www.w3.org/20...chema-instance" xmlns:xsd="http://www.w3.org/20...001/XMLSchema"]
[soap:Header]
[RequesterCredentials xmlns="urn:ebay:api:PayPalAPI"]
[Credentials xmlns="urn:ebay:apis:eBLBaseComponents"]
[Username]snipped[/Username]
[Password]snipped[/Password]
[/Credentials]
[/RequesterCredentials]
[/soap:Header]
[soap:Body]
[DoExpressCheckoutPaymentReq xmlns="urn:ebay:api:PayPalAPI"]
[DoExpressCheckoutPaymentRequest]
[Version xmlns="urn:ebay:apis:eBLBaseComponents"]2.0[/Version]
[DoExpressCheckoutPaymentRequestDetails xmlns="urn:ebay:apis:eBLBaseComponents"]
[PaymentAction]Sale[/PaymentAction]
[Token]snipped[/Token]
[PayerID]snipped[/PayerID]
[PaymentDetails]
[OrderTotal currencyID="USD"]111.09[/OrderTotal]
[OrderDescription]Order placed on September 14, 2008, 1:22 am snipped[/OrderDescription]
[ItemTotal currencyID="USD"]106.4[/ItemTotal]
[ShippingTotal currencyID="USD"]4.8[/ShippingTotal]

[HandlingTotal currencyID="USD"]-0.11[/HandlingTotal]

[TaxTotal currencyID="USD"]0[/TaxTotal]
[NotifyURL]https://snipped paypal_ec/ipn.php?language=english[/NotifyURL]
[Custom]Phone: -- Email:snipped[/Custom]
[ShipToAddress]
[Name][/Name]
[Street1][/Street1]
[Street2][/Street2]
[CityName][/CityName]
[StateOrProvince][/StateOrProvince]
[PostalCode][/PostalCode]
[Country][/Country]
[/ShipToAddress]
[snipped]
[/PaymentDetails]
[/DoExpressCheckoutPaymentRequestDetails]
[/DoExpressCheckoutPaymentRequest]
[/DoExpressCheckoutPaymentReq]
[/soap:Body]
[/soap:Envelope]

#389   miamizx

miamizx
  • Members
  • 61 posts
  • Real Name:Oliver
  • Gender:Male
  • Location:Miami

Posted 22 September 2008 - 21:39

I'm getting this error:

An error occured when we tried to process your payment. Please contact the store owner for assistance.

Transaction refused because of an invalid argument. See additional error messages for details. (10415)
A successful transaction has already been completed for this token.

The process seems to do everything fine, it shoots me over to paypal and then back to my cart. Seems like the actual transaction is taking place when I go over to paypal, but then when I get sent back to my cart and click the "pay" button I get the error.

The transaction is going trough on the paypal side and the user gets charged but I don't get anything on the osc side.

Had anyone encountered this before?

#390   miamizx

miamizx
  • Members
  • 61 posts
  • Real Name:Oliver
  • Gender:Male
  • Location:Miami

Posted 23 September 2008 - 16:41

I'm getting this error:

An error occured when we tried to process your payment. Please contact the store owner for assistance.

Transaction refused because of an invalid argument. See additional error messages for details. (10415)
A successful transaction has already been completed for this token.

The process seems to do everything fine, it shoots me over to paypal and then back to my cart. Seems like the actual transaction is taking place when I go over to paypal, but then when I get sent back to my cart and click the "pay" button I get the error.

The transaction is going trough on the paypal side and the user gets charged but I don't get anything on the osc side.

Had anyone encountered this before?



Update - for some reason my cart was still using checkout_shipping instead of ec_shipping and checkout_confirmation instead of express_checout in some instances.

Now thats resolved on to the next one:

I have installed Online Gift Cards contribution, everything works fine but I get an error if the total - gift cards = 0. The contribution has some code to work around this but it doesn't seem to work with EC IPN (it skips payment info if the total is 0). Does anyone know how to hide the paypal button if the amount is 0?

This is the code from the gift card contrib.

/* ogc mod to skip payment info if gift card reduces amount < $0 ---- 9/18/08 */    if (tep_session_is_registered('gift_card')) {    $gift_card_query = tep_db_query("select * from `".TABLE_GIFT_CARDS."` where gift_cards_code='".$_SESSION['gift_card']."' and gift_cards_enabled='1'");    if (tep_db_num_rows($gift_card_query)>0) {	  $gift_card_row = tep_db_fetch_array($gift_card_query);	  $remaining_amount = $gift_card_row['gift_cards_amount_remaining'];	  // check to see if the user has a valid amount left on gift card	  $order_amount_left_over =   $order->info['total'] - $remaining_amount;			  if ($order_amount_left_over <= 0) {	    tep_redirect(FILENAME_CHECKOUT_CONFIRMATION);	  }	}  }    /* end of ocg mod -- 9/18/08 */


#391   metaphor_e

metaphor_e
  • Members
  • 3 posts
  • Real Name:Erin cornell

Posted 25 September 2008 - 05:09

I did a hack to get coupons working with this module again. It's not pretty but it works.

In includes>modules>payment>paypal_ec.php

Find (in 2 places)
$su_total = round($order->info['subtotal'] * $currencies->get_value($currency_id), $decimal);

Replace
$su_total = (round($order->info['subtotal'] * $currencies->get_value($currency_id), $decimal) +round(($order->info['total'] - $order->info['subtotal'] - $order->info['shipping_cost'] - $order->info['tax']) * $currencies->get_value($currency_id), $decimal));

Find x 2
$order_info['PAYPAL_ORDER_TOTAL'] = $su_total + $sh_total + $tx_total + $ha_toatl; //**** Use the sum of all items to avoid decimal rounds mismatch the total.

Replace
$order_info['PAYPAL_ORDER_TOTAL'] = $su_total + $sh_total + $tx_total; //**** Use the sum of all items to avoid decimal rounds mismatch the total.

Find x 2
$order_info['PAYPAL_HANDLING_TOTAL'] = $ha_toatl;

Replace
$order_info['PAYPAL_HANDLING_TOTAL'] = '';

#392   miamizx

miamizx
  • Members
  • 61 posts
  • Real Name:Oliver
  • Gender:Male
  • Location:Miami

Posted 25 September 2008 - 14:57

I'm still having the same issues after this hack. I get an errors because the total is $0 (after the gift card is applied). I would just love to find a way to skip payment when the total is $0.

I did a hack to get coupons working with this module again. It's not pretty but it works.

In includes>modules>payment>paypal_ec.php

Find (in 2 places)
$su_total = round($order->info['subtotal'] * $currencies->get_value($currency_id), $decimal);

Replace
$su_total = (round($order->info['subtotal'] * $currencies->get_value($currency_id), $decimal) +round(($order->info['total'] - $order->info['subtotal'] - $order->info['shipping_cost'] - $order->info['tax']) * $currencies->get_value($currency_id), $decimal));

Find x 2
$order_info['PAYPAL_ORDER_TOTAL'] = $su_total + $sh_total + $tx_total + $ha_toatl; //**** Use the sum of all items to avoid decimal rounds mismatch the total.

Replace
$order_info['PAYPAL_ORDER_TOTAL'] = $su_total + $sh_total + $tx_total; //**** Use the sum of all items to avoid decimal rounds mismatch the total.

Find x 2
$order_info['PAYPAL_HANDLING_TOTAL'] = $ha_toatl;

Replace
$order_info['PAYPAL_HANDLING_TOTAL'] = '';



#393   Dennisra

Dennisra
  • Members
  • 515 posts
  • Real Name:Joseph D. Jefferson
  • Gender:Male

Posted 13 October 2008 - 16:44

Apparently PayPal changed their server behavior so the negative value is no longer accepted. For the time being please tweak your osCommerce setting 'Display TAX with Price' to work around the problem. I'll make a fix for this change when I get time.


Is this contribution no longer supported by anyone?

#394   LUVU

LUVU
  • Members
  • 4 posts
  • Real Name:Tira

Posted 23 October 2008 - 23:54

I just added this module and it totally blanked out my webstore, not the admin section though.

www.luvubeauty.com/shop1/

thankfully it's just a test store and I am really really hoping you can help me

#395   gemini777

gemini777
  • Members
  • 2 posts
  • Real Name:Gem

Posted 27 October 2008 - 03:20

I have installed the PayPal Express Checkout IPN Payment Module with oscMax2 rc3 and it is functioning correctly when making a standard purchase. However, I would like to be able to use the coupon module included with oscMax. When I attempt to redeem a coupon I get the following error:

An error occured when we tried to process your payment. Please contact the store owner for assistance.<br><br>Invalid Data (10428)<br>Handling total is invalid

I assume I need to add some code to account for the coupon. I'm hoping someone can tell me what I need to add or point me in the right direction. Any help is appreciated. Thank you.

#396   helenmarie123

helenmarie123
  • Members
  • 20 posts
  • Real Name:Helen Downer

Posted 15 November 2008 - 14:04

Hello,

I have just installed this module and like another user above my shop has disappeared with just some errors showing:

Warning: main(includes/languages/english/FILENAME_DEFAULT) [function.main]: failed to open stream: No such file or directory in /home/sites/******.co.uk/public_html/index.php on line 36

Warning: main(includes/languages/english/FILENAME_DEFAULT) [function.main]: failed to open stream: No such file or directory in /home/sites/********.co.uk/public_html/index.php on line 36

Warning: main(includes/languages/english/FILENAME_DEFAULT) [function.main]: failed to open stream: No such file or directory in /home/sites/********.co.uk/public_html/index.php on line 36

Fatal error: main() [function.require]: Failed opening required 'includes/languages/english/FILENAME_DEFAULT' (include_path='.:/usr/share/pear') in /home/sites/*******.co.uk/public_html/index.php on line 36

(NOTE:*I have taken the shop name out.)

I am using an oscommerce template bought from templatemonster if that has anything to do with it?

Does anybody know how I can fix this problem?

Thanks in advance.
Helen.

Edited by helenmarie123, 15 November 2008 - 14:06.


#397   JangoF

JangoF
  • Members
  • 258 posts
  • Real Name:John Doe #597

Posted 13 December 2008 - 12:29

I just installed this on a testsite before transferring over to live, but doesn't it seem strange to anyone that the stock update is commented out? When I go through with test orders, the stock is in fact not depleted by 1 for the item. Just a FYI, someone should check this, because it could cause some serious problems in your store.

Edit: Easy to fix though, just uncomment the stock code in ppeb.php

Edited by JangoF, 13 December 2008 - 12:42.


#398   support@dir

support@dir
  • Members
  • 77 posts
  • Real Name:will
  • Gender:Male

Posted 03 February 2009 - 18:39

i installed this contrubute and it works great, i am so happy.

one small prblem.

in the admin when it says

Utilize Express Checkout Button?
Do you want to show the Express Checkout Button in checkout shipping page? (RECOMMENDED: Yes)

i said yes but when i go to the shipping page their is just a x where the picture should be. what is the file name and where is it looking so i can put something their. that is so their will be a picture their. its an easy fix i just need to know what to name the file and where to put it.

#399   Dennisra

Dennisra
  • Members
  • 515 posts
  • Real Name:Joseph D. Jefferson
  • Gender:Male

Posted 26 February 2009 - 17:26

This only occurs when there is a "Special" item in the shopping cart.

Anyone shed some light on this problem?

BODY {font-family="Tahoma"} TT {font-family="Courier"} BLOCKQUOTE.CITE {padding-left:0.5em; margin-left:0; margin-right:0; margin-top:0; margin-bottom:0; border-left:"solid 2";} Has anyone had experience with this error. Is there a fix available?
"The totals of the cart item amounts do not match order amounts."

In function: before_process()
Response from PayPal:

[Security] = N/A
[RequesterCredentials]
[0]
[Credentials]
[0]
[Username] = N/A
[Password] = N/A
[Subject] = N/A

[DoExpressCheckoutPaymentResponse]
[0]
[Timestamp] = 2008-09-14T06:24:15Z
[Ack] = FailureWithWarning
[CorrelationID] = 2fd540f051c55
[Errors]
[0]
[ShortMessage] = Invalid Data
[LongMessage] = Handling total is invalid.
[ErrorCode] = 10428
[SeverityCode] = Error

[1]
[ShortMessage] = Transaction refused because of an invalid argument. See additional error messages for details.
[LongMessage] = The totals of the cart item amounts do not match order amounts.
[ErrorCode] = 10413
[SeverityCode] = Warning

[Version] = 2.0
[Build] = 690663
[DoExpressCheckoutPaymentResponseDetails]
[0]
[PaymentInfo]
[0]
[TransactionType] = none
[PaymentType] = none
[PaymentStatus] = None
[PendingReason] = none
[ReasonCode] = none

From this request: (WARNING!!) DO NOT expose your API Username/Password to the public!!

[?xml version="1.0" encoding="utf-8"?]
[soap:Envelope xmlns:soap="http://schemas.xmlso...soap/envelope/" xmlns:xsi="http://www.w3.org/20...chema-instance" xmlns:xsd="http://www.w3.org/20...001/XMLSchema"]
[soap:Header]
[RequesterCredentials xmlns="urn:ebay:api:PayPalAPI"]
[Credentials xmlns="urn:ebay:apis:eBLBaseComponents"]
[Username]snipped[/Username]
[Password]snipped[/Password]
[/Credentials]
[/RequesterCredentials]
[/soap:Header]
[soap:Body]
[DoExpressCheckoutPaymentReq xmlns="urn:ebay:api:PayPalAPI"]
[DoExpressCheckoutPaymentRequest]
[Version xmlns="urn:ebay:apis:eBLBaseComponents"]2.0[/Version]
[DoExpressCheckoutPaymentRequestDetails xmlns="urn:ebay:apis:eBLBaseComponents"]
[PaymentAction]Sale[/PaymentAction]
[Token]snipped[/Token]
[PayerID]snipped[/PayerID]
[PaymentDetails]
[OrderTotal currencyID="USD"]111.09[/OrderTotal]
[OrderDescription]Order placed on September 14, 2008, 1:22 am snipped[/OrderDescription]
[ItemTotal currencyID="USD"]106.4[/ItemTotal]
[ShippingTotal currencyID="USD"]4.8[/ShippingTotal]

[HandlingTotal currencyID="USD"]-0.11[/HandlingTotal]

[TaxTotal currencyID="USD"]0[/TaxTotal]
[NotifyURL]https://snipped paypal_ec/ipn.php?language=english[/NotifyURL]
[Custom]Phone: -- Email:snipped[/Custom]
[ShipToAddress]
[Name][/Name]
[Street1][/Street1]
[Street2][/Street2]
[CityName][/CityName]
[StateOrProvince][/StateOrProvince]
[PostalCode][/PostalCode]
[Country][/Country]
[/ShipToAddress]
[snipped]
[/PaymentDetails]
[/DoExpressCheckoutPaymentRequestDetails]
[/DoExpressCheckoutPaymentRequest]
[/DoExpressCheckoutPaymentReq]
[/soap:Body]
[/soap:Envelope]



#400   modawg

modawg
  • Members
  • 9 posts
  • Real Name:Mo

Posted 14 July 2009 - 03:30

I noticed that there hasn't been any resolved fix to the issue where clicking the "pay" button redirects to login.php. There was a similar problem in Paypal WPP Direct Payments and Express Checkout support thread. It was resolved here: http://forums.oscomm...o...t&p=1395526

It seems as though catalog/includes/modules/payment/paypal_wpp.php and catalog/includes/modules/payment/paypal_ec.php are similar. However, when I applied the fix in the above thread, I encountered this error: Fatal error: Cannot redeclare class payment in /homepages/40/d251991198/htdocs/catalog/includes/classes/payment.php on line 13

I think I'm on the right track to a fix for those of us who are redirected to the login.php page. Can someone please help me out here?

Thanks in advance.

Edited by modawg, 14 July 2009 - 03:32.