PayPal Express Checkout IPN Payment Module
#361
Posted 09 June 2008 - 07:39 PM
#362
Posted 12 June 2008 - 07:29 AM
I would like some help please.
I have just installed this module and am getting the following.
Select item
go to checkout
select delivery details (which includes shipping charge)
order confirmation - select paypal (get success dump email)
Login to paypal
select continue (get success dump email)
returns to delivery details!
confirm again
paypal again
back to shop
displays payment information screen with
"PayPal returned invalid or incomplete data to complete your order. Please try again or select an alternate payment method."
Any ideas?
Thanks
#363
Posted 12 June 2008 - 07:48 AM
strider34, on Jun 12 2008, 03:29 PM, said:
Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.
#364
Posted 12 June 2008 - 07:56 AM
I do not get an error dump email ( there is a success on the way to paypal).
Where do I find Paypal error code/messages? nothing is displayed.
Pete
#365
Posted 12 June 2008 - 08:04 AM
Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.
#366
Posted 12 June 2008 - 08:13 AM
Yes but:
1. I get 404 if I try running it as https://xxxxx.co.uk/ec_diagnostics.php
2 just running at as xxxxxx.co.uk/ec_diagnostics.php Success except for store does not have an SSL certificate installed
Pete
Edited by strider34, 12 June 2008 - 08:14 AM.
#367
Posted 12 June 2008 - 08:35 AM
strider34, on Jun 12 2008, 04:13 PM, said:
Edited by AlexStudio, 12 June 2008 - 08:36 AM.
Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.
#368
Posted 12 June 2008 - 08:58 AM
I am guessing I have the setup right for error dump because I set it to send every transaction which is working.
Here is the success email when going to paypal:
In function: pre_confirmation_check()
Response from PayPal:
[Security] = N/A
[RequesterCredentials]
[0]
[Credentials]
[0]
[Username] = N/A
[Password] = N/A
[Subject] = N/A
[SetExpressCheckoutResponse]
[0]
[Timestamp] = 2008-06-12T07:42:15Z
[Ack] = Success
[CorrelationID] = e7caeca3dc58d
[Version] = 2.000000
[Build] = 600904
[Token] = EC-5X8203055P4376052
>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.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"]
[soap:Header]
[RequesterCredentials xmlns="urn:ebay:api:PayPalAPI"]
[Credentials xmlns="urn:ebay:apis:eBLBaseComponents"]
[Username]xxxxxxxxxxx[/Username]
[Password]xxxxxxxx[/Password]
[Subject][/Subject]
[/Credentials]
[/RequesterCredentials]
[/soap:Header]
[soap:Body]
[SetExpressCheckoutReq xmlns="urn:ebay:api:PayPalAPI"]
[SetExpressCheckoutRequest]
[Version xmlns="urn:ebay:apis:eBLBaseComponents"]2.0[/Version]
[SetExpressCheckoutRequestDetails xmlns="urn:ebay:apis:eBLBaseComponents"]
[OrderTotal currencyID="GBP"]3.85[/OrderTotal]
[ReturnURL]http://www.xxxxx.co.uk/express_checkout.php[/ReturnURL]
[CancelURL]http://www.xxxxxx.co.uk/checkout_payment.php?payment_error=paypal_ec[/CancelURL]
[ReqConfirmShipping]1[/ReqConfirmShipping]
[NoShipping]0[/NoShipping]
[AddressOverride]0[/AddressOverride]
[LocaleCode]US[/LocaleCode]
[PageStyle]PayPal[/PageStyle]
[Address]
[Name]xxxxxxx/Name]
[Street1]xxxxx[/Street1]
[Street2][/Street2]
[CityName]xxxxxxx[/CityName]
[StateOrProvince]xxxxxxxx[/StateOrProvince]
[PostalCode]xxxxxxxx[/PostalCode]
[Country]GB[/Country]
[Phone]xxxxxxxx[/Phone]
[/Address]
[BuyerEmail]xxxxxxxxx[/BuyerEmail]
[/SetExpressCheckoutRequestDetails]
[/SetExpressCheckoutRequest]
[/SetExpressCheckoutReq]
[/soap:Body]
[/soap:Envelope]
#369
Posted 12 June 2008 - 09:10 AM
strider34, on Jun 12 2008, 04:58 PM, said:
Yes, I'm willing to help, but please ask in the right place. Think twice before trying to PM me, it might be ignored.
#370
Posted 12 June 2008 - 10:45 AM
I really appreciate your help but I am struggling!
I have set force cookies on.
Sessions appear to be working but I am not sure what to check.
The reason for installing your module is because the server got upgraded at the weekend to php5 and so on Monday morning I had to fix various things to get the site running.
Amongst other things the server now has register globals off so I have added
php_flag register_globals on to the .htaccess files in /var/www/html and /var/www/html/includes.
I also modded files according to the contrib "Register Globals Off Workaround for PHP4 and PHP5".
That seemed to get everything going except that the paypal module (unknown origin, I did not create site) happily took money but returned no information about what they had bought.
I then installed the paypal official express checkout which worked fine apart from overriding the shipping which was no good.
Then I tried another module which fell over.
So after much more research found your contribution which looked good and well supported.
Any more suggestions please?
Best Regards
Pete
#371
Posted 17 June 2008 - 08:34 AM
Well i got to say..great coding and easy to use contribution. Simply add to request my API certificate from my old sandboy accoubnt and it worked like a charm.
I do however have a couple of comments/requests.
I so far used the original PayPal IPN mod with the flow we all know and a specific checkout_success page. This used to be a pain and not compatible with some other mods, but welll, to worked and customer payed
The notification was also storing the paypal fee on the database! A quiet neat layout box with the paypal logo would also show on the order (if paid by paypal), and this was containing the gross paid , fee, status and also a link to more details.
Would it be easy to include this features? Knowing the paypal fee is of great importance when doing the monthly account.
Are you planning on doing this? And if not, could you provide me with pointer as to where to look to make this changes?
I will also look into making this compatible with the GV mod (I think u already work on this), and the PWA mod .. .should be fun
Thanks
#372
Posted 18 June 2008 - 10:25 PM
Any thoughts to what would cause this?
#373
Posted 26 June 2008 - 08:54 PM
I hope you can help me - been using the module fine for 6months or so - then 12 hours ago however we started getting masses of complaints from customers they are getting the following error and log below. I tried doing the checkout with a test out and couldn't replicate the problem!!!
Hope you can help!
Kind Regards
John____________
''We're sorry, but we were unable to process your payment.
An error occured when we tried to process your payment. Please contact the store owner for assistance.
Invalid Data (10413)
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-06-26T20:07:44Z
[Ack] = Failure
[CorrelationID] = 77e3f98ea92cc
[Errors]
[0]
[ShortMessage] = Invalid Data
[LongMessage] = The totals of the cart item amounts do not match order amounts.
[ErrorCode] = 10413
[SeverityCode] = Error
[Version] = 2.000000
[Build] = 600904
[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.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"]
[soap:Header]
[RequesterCredentials xmlns="urn:ebay:api:PayPalAPI"]
[Credentials xmlns="urn:ebay:apis:eBLBaseComponents"]
[Username]xxxxx[/Username]
[Password]xxxxx[/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]EC-4E8757012L507735G[/Token]
[PayerID]KB5WM3DTD7CX8[/PayerID]
[PaymentDetails]
[OrderTotal currencyID="AUD"]36.99[/OrderTotal]
[OrderDescription]Order placed on June 27, 2008, 6:07 am by xxxxxx)[/OrderDescription]
[ItemTotal currencyID="AUD"]26.99[/ItemTotal]
[ShippingTotal currencyID="AUD"]10[/ShippingTotal]
[HandlingTotal currencyID="AUD"]-3.36[/HandlingTotal]
[TaxTotal currencyID="AUD"]3.36[/TaxTotal]
[NotifyURL]https://www.jja-entertainment.com.au/ext/modules/payment/paypal_ec/ipn.php?language=english[/NotifyURL]
[Custom]Phone: -- Email: xxxxx[/Custom]
[ShipToAddress]
[Name]xxxx[/Name]
[Street1]xxxx[/Street1]
[Street2][/Street2]
[CityName]xxxx[/CityName]
[StateOrProvince][/StateOrProvince]
[PostalCode]xxxxx[/PostalCode]
[Country]Xx[/Country]
[/ShipToAddress]
[PaymentDetailsItem][Name]xxxxx[/Name][Number]21671 (790)[/Number][Amount currencyID="AUD"]24.54[/Amount][Quantity]1[/Quantity][Tax currencyID="AUD"]2.45[/Tax][/PaymentDetailsItem]
[/PaymentDetails]
[/DoExpressCheckoutPaymentRequestDetails]
[/DoExpressCheckoutPaymentRequest]
[/DoExpressCheckoutPaymentReq]
[/soap:Body]
[/soap:Envelope]
#374
Posted 27 June 2008 - 10:32 PM
everything passed in the diagnostics, except the SSL. Also getting a blank checkout page.
Dump:
In function: pre_confirmation_check()
Response from PayPal:
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.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"]
[soap:Header]
[RequesterCredentials xmlns="urn:ebay:api:PayPalAPI"]
[Credentials xmlns="urn:ebay:apis:eBLBaseComponents"]
[Username]xxx[/Username]
[Password]xxx[/Password]
[Subject][/Subject]
[/Credentials]
[/RequesterCredentials]
[/soap:Header]
[soap:Body]
[SetExpressCheckoutReq xmlns="urn:ebay:api:PayPalAPI"]
[SetExpressCheckoutRequest]
[Version xmlns="urn:ebay:apis:eBLBaseComponents"]2.0[/Version]
[SetExpressCheckoutRequestDetails xmlns="urn:ebay:apis:eBLBaseComponents"]
[OrderTotal currencyID="USD"]0.01[/OrderTotal]
[ReturnURL]http://travelcardpr.com/cart/catalog/express_checkout.php[/ReturnURL]
[CancelURL]http://travelcardpr.com/cart/catalog/ec_shipping.php?address_error=0[/CancelURL]
[ReqConfirmShipping]1[/ReqConfirmShipping]
[NoShipping]0[/NoShipping]
[AddressOverride]0[/AddressOverride]
[LocaleCode]US[/LocaleCode]
[PageStyle]PayPal[/PageStyle]
[Address]
[Name]xxx[/Name]
[Street1]xxx[/Street1]
[Street2][/Street2]
[CityName]xxx[/CityName]
[StateOrProvince]xxx[/StateOrProvince]
[PostalCode]xxx[/PostalCode]
[Country]xxx[/Country]
[Phone]xxx[/Phone]
[/Address]
[BuyerEmail]xxx[/BuyerEmail]
[/SetExpressCheckoutRequestDetails]
[/SetExpressCheckoutRequest]
[/SetExpressCheckoutReq]
[/soap:Body]
[/soap:Envelope]
Thanks =)
#375
Posted 30 June 2008 - 05:38 AM
strider34, on Jun 12 2008, 11:45 AM, said:
I really appreciate your help but I am struggling!
I have set force cookies on.
Sessions appear to be working but I am not sure what to check.
The reason for installing your module is because the server got upgraded at the weekend to php5 and so on Monday morning I had to fix various things to get the site running.
Amongst other things the server now has register globals off so I have added
php_flag register_globals on to the .htaccess files in /var/www/html and /var/www/html/includes.
I also modded files according to the contrib "Register Globals Off Workaround for PHP4 and PHP5".
That seemed to get everything going except that the paypal module (unknown origin, I did not create site) happily took money but returned no information about what they had bought.
I then installed the paypal official express checkout which worked fine apart from overriding the shipping which was no good.
Then I tried another module which fell over.
So after much more research found your contribution which looked good and well supported.
Any more suggestions please?
Best Regards
Pete
Thanks to Gorf the answer is:
Just use the session.php files (catalog and admin) from the 2.2rc2a download (along with what was already installed from this contribution) and everything looks good.
Pete
#376
Posted 02 July 2008 - 02:14 PM
Thanks for a great contribution!
#377
Posted 03 July 2008 - 12:22 AM
2 customers called today, both happened to be ordering from me and some other businesses that use osc and the ipn module.
If so, anyone aware of the fix to the issue, I do not see mentions in the threads yet?
#378
Posted 12 July 2008 - 05:29 AM
This started about 24 hours ago and all payments have now stopped coming in...it happens just when the customer is about to click pay right at the end.
For some reason the TAX amount is being sent to paypal (even though here in Australia GST is included in the total).
Then the TAX is being refunded via a credit to the handling charge. Why is this?
I think it might be the cause of the error but I'm not sure - in any event the grand total works out the same...but realyl no tax amount should be sent to paypal and no tax credit should be applied via the handling charge being a negative amount.
Kind Regards
John
___________________
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-12T05:10:57Z
[Ack] = FailureWithWarning
[CorrelationID] = f1613a531553d
[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] = 628921
[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.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"]
[soap:Header]
[RequesterCredentials xmlns="urn:ebay:api:PayPalAPI"]
[Credentials xmlns="urn:ebay:apis:eBLBaseComponents"]
[Username]x[/Username]
[Password]x[/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]EC-93K748124Y601152B[/Token]
[PayerID]JSR9UTZ22FCFN[/PayerID]
[PaymentDetails]
[OrderTotal currencyID="AUD"]14.99[/OrderTotal]
[OrderDescription]xxx[/OrderDescription]
[ItemTotal currencyID="AUD"]9.99[/ItemTotal]
[ShippingTotal currencyID="AUD"]5[/ShippingTotal]
[HandlingTotal currencyID="AUD"]-1.36[/HandlingTotal]
[TaxTotal currencyID="AUD"]1.36[/TaxTotal]
[NotifyURL]https://www.jja-entertainment.com.au/ext/modules/payment/paypal_ec/ipn.php?language=english[/NotifyURL]
[Custom]Phone: -- Email: [/Custom]
[ShipToAddress]
[Name]JJA Entertainment[/Name]
[Street1]x[/Street1]
[Street2][/Street2]
[CityName]Sydney[/CityName]
[StateOrProvince]NEW SOUTH WALES[/StateOrProvince]
[PostalCode]x[/PostalCode]
[Country]AU[/Country]
[/ShipToAddress]
[PaymentDetailsItem][Name]DEUS EX GAME OF THE YEAR 2 CD SET PC NEW & SEALED (eBay #200237998762, x)[/Name][Number]22950 (2088)[/Number][Amount currencyID="AUD"]9.08[/Amount][Quantity]1[/Quantity][Tax currencyID="AUD"]0.91[/Tax][/PaymentDetailsItem]
[/PaymentDetails]
[/DoExpressCheckoutPaymentRequestDetails]
[/DoExpressCheckoutPaymentRequest]
[/DoExpressCheckoutPaymentReq]
[/soap:Body]
[/soap:Envelope]
#379
Posted 15 July 2008 - 10:12 PM
quarkster, on Jul 12 2008, 07:29 AM, said:
This started about 24 hours ago and all payments have now stopped coming in...it happens just when the customer is about to click pay right at the end.
For some reason the TAX amount is being sent to paypal (even though here in Australia GST is included in the total).
Then the TAX is being refunded via a credit to the handling charge. Why is this?
I think it might be the cause of the error but I'm not sure - in any event the grand total works out the same...but realyl no tax amount should be sent to paypal and no tax credit should be applied via the handling charge being a negative amount.
Kind Regards
John
__________________
In function: before_process()
Response from PayPal:
I had too tidy up the calculations in paypal_ec.php (am using the one from AlexStudio in express checkout contrib)
I replaced the calculation to be: (note // is removed code)
$su_total = round($order->info['subtotal'] * $currencies->get_value($currency_id), $decimal);
$sh_total = round($order->info['shipping_cost'] * $currencies->get_value($currency_id), $decimal);
$tx_total = round($order->info['tax'] * $currencies->get_value($currency_id), $decimal);
$tx_item = round($this->ec_generate_PDI($currency_id, true) * $currencies->get_value($currency_id), $decimal);
//$ha_total = round((($order->info['total'] ) - $order->info['subtotal'] - $order->info['shipping_cost'] - $order->info['tax']) * $currencies->get_value($currency_id), $decimal);
$ha_total = round((($order->info['total'] ) - $order->info['subtotal'] - $order->info['shipping_cost'] - ($order->info['tax'] - $tx_item)) * $currencies->get_value($currency_id), $decimal);
$ot_total = round($order->info['total'] * $currencies->get_value($currency_id), $decimal);
$su_totalex = $su_total - $tx_item;
//$order_info['PAYPAL_ORDER_TOTAL'] = $su_total + $sh_total + $tx_total + $ha_total; //**** Use the sum of all items to avoid decimal rounds mismatch the total.
$order_info['PAYPAL_ORDER_TOTAL'] = $ot_total; //if only ordertotal is given the ship+order is not checked and never a problem
$order_info['PAYPAL_CURRENCY'] = $currency_id;
$email = "Order total=" . $ot_total . "\nItemEx" . $su_totalex . "\n Shipping=" . $sh_total . "\ntxtotal=" . $tx_total . "\ntxitem=" . $tx_item . "\nhatotal=" . $ha_total . "\norder total=" . ($su_totalex + $sh_total + $tx_total + $ha_total) . "\n";
tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, 'PayPal EC Check Error', $email, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
note, I send myself an email to check the amount, can delete afterwards.
Now the payments come through. However,still the status is warning:
they send me:
[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
and I can really not see any error, If i add it all up it fits..?
#380
Posted 16 July 2008 - 06:03 PM
vjren, on Jul 16 2008, 08:12 AM, said:
they send me:
[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
and I can really not see any error, If i add it all up it fits..?
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;









