Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PayPal Express Checkout IPN Payment Module


AlexStudio

Recommended Posts

  • 3 weeks later...
  • Replies 405
  • Created
  • Last Reply

Top Posters In This Topic

I've been getting the error on the server side :

 

We're sorry, but we were unable to process your payment.

 

An error occured when we tried to process your payment. Please try again or select an alternate payment method.

 

Below I've pasted in the debugging code I get through the email. Everything else seems to be working fine except for the very last stage of processing the payment.

 

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] = 2007-06-21T12:17:56Z

[Ack] = FailureWithWarning

[CorrelationID] = ccb0c0d9e4911

 

- Hide quoted text -

[Errors]

[0]

[shortMessage] = Transaction refused because of an invalid argument. See additional error messages for details.

[LongMessage] = Currency is not supported

[ErrorCode] = 10401

[severityCode] = Error

 

[1]

[shortMessage] = Transaction refused because of an invalid argument. See additional error messages for details.

[LongMessage] = Currency is not supported

[ErrorCode] = 10426

[severityCode] = Error

 

[2]

[shortMessage] = Transaction refused because of an invalid argument. See additional error messages for details.

[LongMessage] = Currency is not supported

[ErrorCode] = 10427

[severityCode] = Error

 

[3]

[shortMessage] = Transaction refused because of an invalid argument. See additional error messages for details.

[LongMessage] = Currency is not supported

[ErrorCode] = 10428

[severityCode] = Error

 

[4]

[shortMessage] = Transaction refused because of an invalid argument. See additional error messages for details.

[LongMessage] = Currency is not supported

[ErrorCode] = 10429

[severityCode] = Error

 

[5]

[shortMessage] = Transaction refused because of an invalid argument. See additional error messages for details.

[LongMessage] = Item amount is missing.

[ErrorCode] = 10430

[severityCode] = Warning

 

[Version] = 2.000000

[build] = 1.0006

[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]**********[/username]

[Password]**********[/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]PAYPAL_TOKEN[/Token]

[PayerID]PAYPAL_PAYER_ID[/PayerID]

[PaymentDetails]

[OrderTotal currencyID=PAYPAL_CURRENCY]PAYPAL_ORDER_TOTAL[/OrderTotal]

[OrderDescription]PAYPAL_ORDER_DESCRIPTION[/OrderDescription]

[itemTotal currencyID=PAYPAL_CURRENCY]PAYPAL_ITEM_TOTAL[/itemTotal]

[shippingTotal currencyID=PAYPAL_CURRENCY]PAYPAL_SHIPPING_TOTAL[/shippingTotal]

[HandlingTotal currencyID=PAYPAL_CURRENCY]PAYPAL_HANDLING_TOTAL[/HandlingTotal]

[TaxTotal currencyID=PAYPAL_CURRENCY]PAYPAL_TAX_TOTAL[/TaxTotal]

[NotifyURL]PAYPAL_NOTIFY_URL[/NotifyURL]

[Custom]PAYPAL_CUSTOM[/Custom]

[shipToAddress]

[Name]PAYPAL_SHIPPING_NAME[/Name]

[street1]PAYPAL_SHIPPING_ADDRESS1[/street1]

[street2]PAYPAL_SHIPPING_ADDRESS2[/street2]

[CityName]PAYPAL_SHIPPING_CITY[/CityName]

[stateOrProvince]PAYPAL_SHIPPING_STATE[/stateOrProvince]

[PostalCode]PAYPAL_SHIPPING_ZIP[/PostalCode]

[Country]PAYPAL_SHIPPING_COUNTRY[/Country]

[/shipToAddress]

[PaymentDetailsItem][Name]Pound[/Name][Number]59 (Pound)[/Number][Amount currencyID=""]0[/Amount][Quantity]1[/Quantity][Tax currencyID=""]0[/Tax][/PaymentDetailsItem]

[/PaymentDetails]

[/DoExpressCheckoutPaymentRequestDetails]

[/DoExpressCheckoutPaymentRequest]

[/DoExpressCheckoutPaymentReq]

[/soap:Body]

[/soap:Envelope]

 

 

 

I would assume that the 5 errors that are appearing in the debugging are referring to these lines of code

 

[OrderTotal currencyID=PAYPAL_CURRENCY]PAYPAL_ORDER_TOTAL[/OrderTotal]

[OrderDescription]PAYPAL_ORDER_DESCRIPTION[/OrderDescription]

[itemTotal currencyID=PAYPAL_CURRENCY]PAYPAL_ITEM_TOTAL[/itemTotal]

[shippingTotal currencyID=PAYPAL_CURRENCY]PAYPAL_SHIPPING_TOTAL[/shippingTotal]

[HandlingTotal currencyID=PAYPAL_CURRENCY]PAYPAL_HANDLING_TOTAL[/HandlingTotal]

[TaxTotal currencyID=PAYPAL_CURRENCY]PAYPAL_TAX_TOTAL[/TaxTotal]

 

However I've dumped the $order array on the checkout confirmation page "express_checkout.php" and we're definitely getting the currency value through as "GBP".

 

Does anybody have any ideas of why this error is occurring?

Link to comment
Share on other sites

The data stored in $_SESSION['paypal_ec_order_info'] was lost when you reached checkout_process.php (PAY button hit). If you didn't modify the code then there must be something wrong with your installation.

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

The data stored in $_SESSION['paypal_ec_order_info'] was lost when you reached checkout_process.php (PAY button hit). If you didn't modify the code then there must be something wrong with your installation.

I've just reinstalled Express Checkout making sure all the modifications are in place on each of the files;

 

checkout_shipping.php

checkout_payment.php

filenames.php

 

Would not having

 

? //---PayPal WPP Modification START ---//-- ?>

<?php

if ($ec_checkout && $ec_enabled) {

$paypal_ec_payer_info = $_SESSION['paypal_ec_payer_info'];

$address_label = $paypal_ec_payer_info['payer_firstname'] . ' ' . $paypal_ec_payer_info['payer_lastname'] . '<br>';

if ($paypal_ec_payer_info['payer_business']) $address_label .= $paypal_ec_payer_info['payer_business'].'<br>';

$address_label .= $paypal_ec_payer_info['ship_street_1'] . '<br>';

if ($paypal_ec_payer_info['ship_street_2']) $address_label .= $paypal_ec_payer_info['ship_street_2'].'<br>';

$address_label .= $paypal_ec_payer_info['ship_city'] . ', ' . $paypal_ec_payer_info['ship_state'] . ' ' . $paypal_ec_payer_info['ship_postal_code'] . '<br>';

$address_label .= $paypal_ec_payer_info['ship_country_name'];

?>

<td class="main" valign="top"><?php echo $address_label; ?></td>

<?php } else { ?>

<td class="main" valign="top"><?php echo tep_address_label($customer_id, $sendto, true, ' ', '<br>'); ?></td>

<?php } ?>

<? //---PayPal WPP Modification END ---//-- ?>

 

in the checkout_shipping.php page give us the error that I've explained above?

Link to comment
Share on other sites

Would not having

in the checkout_shipping.php page give us the error that I've explained above?

Where did you find these code? There is no such code in the checkout_shipping.php.

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

I think you probably posted in the wrong thread. Are you using PayPal Pro Direct Payments & Express Checkout contribution?

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

I've been searching the forum for the error message that I'm receiving but I'm not getting relevant results.

 

I have an ssl certificate installed on my domain.com. My oscommerce is installed on domain.com/shop. When I run the ec_diagnostics.php for /shop I get this error

 

OpenSSL Not Detected!

 

The required OpenSSL functions not detected.

 

PayPal Express Checkout IPN module won't work without OpenSSL installed.

 

Please contact your host for OpenSSL installation. A dedicated or shared SSL certificate is highly recommended.

 

Any help would be great.

Edited by sheenaw

I'm working on multiple stores with multiple problems.

Link to comment
Share on other sites

OpenSSL and Shared/Dedicated SSLs are two different things. OpenSSL functionality is a server wide install which must be done by the server admin.

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

Link to comment
Share on other sites

The openssl function checking is redundant and will be removed in the next update release. Please remove these 2 lines in the ec_diagnostics.php
  if (function_exists('openssl_pkcs7_sign') && function_exists('openssl_pkcs7_encrypt')) $ssl_error = false;
 else $ssl_error = true;

 

Nice to see you here Terra.

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

Hi guys

 

It is impossible for me to figure out how to move the EC button at the beginning of the payment flow, at the moment cust must insert his details before reach the ec button. any solution?

Link to comment
Share on other sites

I cannot figure out why my express_checkout page leads me to a blank page? When I go to mysite/ec_diagnostics.php everything is Yes except for the SSL certificate installed and working which reads "No" -- even though I have an image on the bottom of my homepage leading to GoDaddy which says it is secure.

 

Could this be the reason why express_checkout page is showing up as a blank page?

Link to comment
Share on other sites

It is impossible for me to figure out how to move the EC button at the beginning of the payment flow, at the moment cust must insert his details before reach the ec button. any solution?
I will make a separate release of this contribution when I have time, to support PWA (purchase without account), so the customers don't need to insert personal info to your store before they reach the EC button. Supporting PWA will make this contribution much more complicated and not as easy to install, so it will be separated from this 'compact' version.

 

I cannot figure out why my express_checkout page leads me to a blank page? When I go to mysite/ec_diagnostics.php everything is Yes except for the SSL certificate installed and working which reads "No" -- even though I have an image on the bottom of my homepage leading to GoDaddy which says it is secure.

 

Could this be the reason why express_checkout page is showing up as a blank page?

The ec_diagnostics.php script is telling you that no SSL certificate detected probably because GoDady server responds to the getenv('HTTPS') function with a different string than expected, and with a port other than 443 (standard https port). However, it can't be the reason why you got a blank express_checkout page. The infomation you gave here is not sufficient to tell what went wrong in your site.

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

There is a crucial error in your ec_diagnostics result page, API Certificate installed?........No

 

Please follow the installation guide to download your PayPal API certificate and store it at the right place.

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

receiving this error message in checkout_payment after selecting Paypal Express:

 

PayPal Express Checkout IPN module installation incomplete! There should be XML files located in http://www.gocoursing.com/includes/ec_xml/ !

 

all files have been uploaded to includes/ec_xml

diagnostics show no problems or errors

Paypal Express is the first payment option listed

 

 

 

I have read through this support thread and found mention of needing the Register Globals patch. If this is my problem, can you direct me to the exact Register Globals contrib to use? There are several listed in the contribs section.

 

Thanks,

Link to comment
Share on other sites

receiving this error message in checkout_payment after selecting Paypal Express:

 

PayPal Express Checkout IPN module installation incomplete! There should be XML files located in http://www.gocoursing.com/includes/ec_xml/ !

Check your includes/configure.php for the definition of DIR_FS_CATALOG. It should read:
  define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/');

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 your server has register globals off, you need the register globals contribution. You can also try the pre-patched version of the same contribution posted by Vger, or the Force Register Globals On contribution. 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.

Link to comment
Share on other sites

Thanks! I implemented the last one - Force Register Globals On. I also disabled the PWA contribution since it seems that there are issues with it (I had planned on removing it anyway). Still no luck!

 

However...... after going back and double checking all of the files involved I realized that the permissions on configure.php were still set at read only (444) so even though I had made this change in that file earlier today, the change was never saved....

 

define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/');

 

 

Usually that's the case right..... something very basic that's right in front of you... So reminder to anyone making this change - make sure your permissions are set to let you make it!

 

Thanks for a great contrib and for the continued support of it!

 

~Ruthanna

www.goCoursing.com

Link to comment
Share on other sites

Express Checkout IPN & Discount Coupon

 

Hello,

 

I am having a hell of a time getting PayPal Express Checkout IPN to work with Discount Coupon Codes (http://www.oscommerce.com/community/contributions,4269)

 

I do not know how to pass the coupon info from "ec_shipping.php" to "express_checkout.php".

 

You can view my site at: http://www.sonadei.com/catalog/index.php

 

I will send you any files you want, I know you are busy but I really need your help.

 

Please let me know what more information you need. Thank you!

Link to comment
Share on other sites

  • 2 weeks later...
The major difference is that the WPP + EC module handles not only PayPal payments via Express Checkout API, but also credit card payments via Direct Payment API.

 

If you have an US business account and you want to accept credit cards, WPP + EC module is a good choice. If you don't have an US business account, or don't want to pay the monthly fee, EC IPN module is an option for you.

 

Then this mod is the one for me! Does anyone know if this module is eligible for the yahoo/paypal promotion? If not I'll definately be working on it to get compliance. Thanks AlexStudio for all you hard work.

Link to comment
Share on other sites

  • 2 weeks later...

AlexStudio,

 

I was testing your contribution out with CCGV(trad) and they seem to be working fairly well together. I did notice that discount coupons are being sent to paypal as a negative handling charge. The transactions seem to be going through okay but over in paypal land the transaction detail screens show 0.00 handling amount and give no explanation why the subtotal is greater than the final total.

 

I tried looking at the SOAP API docs from Paypal and visiting their forum but I couldn't find anything definative as to whether negative amounts were allowed and what the proper way to handle discounts was. Do you or any of the other paypal guru's have any idea?

 

Bryan

Link to comment
Share on other sites

Sorry I'm not familiar with any CCGV, so I don't exactly know how to fix the problem.

 

For the very tricky rounding problem between osCommerce and PayPal, the total amount is calculated by adding up subtotal, shipping total, tax total and handling total.

 

in catalog/includes/modules/payments/paypal_ec.php line 354-358:

	  $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_item = round($this->ec_generate_PDI($currency_id, true) * $currencies->get_value($currency_id), $decimal);
  $tx_total = round($order->info['tax'] * $currencies->get_value($currency_id), $decimal);
  $ha_toatl = round(($order->info['total'] - $order->info['subtotal'] - $order->info['shipping_cost'] - $order->info['tax']) * $currencies->get_value($currency_id), $decimal);

where all the amounts are generated. The $ha_total cannot be acquired from elements in the $order, so it's produced backward.

 

In your case, to support CCGV or other coupons, extra coding in this block is required.

 

P.S. the line starting with $tx_item is redundant, it will be removed.

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

Hello,

 

I have the Express Checkout / Website Payment Pro module installed and working on my site (http://www.mjmautohaus.com) flawlessly.

 

I do, however have one concern/question. It seems to only allow users to check out if the email linked to my store's database is identical to the email they will try to use to pay for at paypal's website. If the emails are not correct it brings them back and asks them to choose a different payment method. My question is this: Is there a way to bypass this and allow them to use whichever email they want on our site? For example, the email on our database could be [email protected] and the email at paypal is [email protected] and I would still want the transaction to take place.

 

Thanks!

Link to comment
Share on other sites

This contribution has nothing to do with Website Payment Pro. I think you're are in the wrong support thread. Please refer to this one.

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

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