Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

PayPal WPP Direct Payments & Express Checkout Support


dynamoeffects

Recommended Posts

Your credit card was declined. Please try another card or contact your bank for more info.

()

 

Odd thing is... the credit card payment is actually processed!

We get this error every single time an order is placed. What is the cause?

 

 

Raising the timeout from 4 to 120 fixed the errors. I thought the README stated this change was made already??? It works now... Now to cure the no address sent to paypal....

Link to comment
Share on other sites

For express checkout, the shipping address is sent from PayPal. For Direct Payment, nothing other than the order total is sent to paypal, which is probably why you get that error. Not really anything worth taking the time to add.

 

 

I think that if it is possible to send the address to paypal for direct payment it would be a nice feature.....

Link to comment
Share on other sites

Looks like the install worked but when I click on the express checkout button I get the error:

 

Warning: paypal_init(Services/PayPal.php): failed to open stream: No such file or directory in /var/www/html/store/includes/modules/payment/paypal_wpp.php on line 273

 

Fatal error: paypal_init(): Failed opening required 'Services/PayPal.php' (include_path='.:/php/includes:/usr/share/php') in /var/www/html/store/includes/modules/payment/paypal_wpp.php on line 273

 

Appears that line 273 is looking for a 'Services' folder. Where do I get these files? I coudn't find any other posts about this error. I'm using v 0.5 .

Link to comment
Share on other sites

Looks like the install worked but when I click on the express checkout button I get the error:

 

Warning: paypal_init(Services/PayPal.php): failed to open stream: No such file or directory in /var/www/html/store/includes/modules/payment/paypal_wpp.php on line 273

 

Fatal error: paypal_init(): Failed opening required 'Services/PayPal.php' (include_path='.:/php/includes:/usr/share/php') in /var/www/html/store/includes/modules/payment/paypal_wpp.php on line 273

 

Appears that line 273 is looking for a 'Services' folder. Where do I get these files? I coudn't find any other posts about this error. I'm using v 0.5 .

 

You need to install Pear which will have the services folder inside it. It is available here: http://www.oscommerce.com/community/contributions,3647

 

Pear Modules - Part 1

Pear Modules - Part 2

 

You need both of these pear files. Install pear into your /catalog directory. The instructions should be in the zip files.

 

Hope this helps.

Link to comment
Share on other sites

You need to install Pear which will have the services folder inside it. It is available here: http://www.oscommerce.com/community/contributions,3647

 

Pear Modules - Part 1

Pear Modules - Part 2

 

You need both of these pear files. Install pear into your /catalog directory. The instructions should be in the zip files.

 

Hope this helps.

 

 

AWESOME THANKS! Did I overlook the pear installation in the instructions for this module? I remember reading that Pear was optional. I'll install. Thanks!

Link to comment
Share on other sites

Just a query regarding this contribution.

 

Will this contribution allow payments to go to my paypal accoutn?

 

Thanks

 

Well, you could set it up to go to someone else's account, but I say let them get their own online store.

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Link to comment
Share on other sites

Hi, I emailed PayPal since I have some difficulties on purchasing things in GBP (USD is fine though).

 

Here is their reply:

 

"I suspect that you are changing the currency code on the final DoExpressCheckoutPayment call to USD or some other currency. Check your code to see what currencyCode you are sending on the final call. If you can log the API requests and responses that should be the easiest way to find out for sure."

 

Does anyone know where to look for the currency code on the final DoExpressCheckoutPayment call? Which file is it located?

 

Also, is there a simple way to log the API requests and responses so that I can send the log to PayPal?

 

Thanks a lot!

Link to comment
Share on other sites

Hi, I emailed PayPal since I have some difficulties on purchasing things in GBP (USD is fine though).

 

Here is their reply:

 

"I suspect that you are changing the currency code on the final DoExpressCheckoutPayment call to USD or some other currency. Check your code to see what currencyCode you are sending on the final call. If you can log the API requests and responses that should be the easiest way to find out for sure."

 

Does anyone know where to look for the currency code on the final DoExpressCheckoutPayment call? Which file is it located?

 

Also, is there a simple way to log the API requests and responses so that I can send the log to PayPal?

 

Thanks a lot!

 

I have EC fully working for CAD so it is possible. I had similar difficulties. Do an XML dump to see what is happening behind the scenes. You can do this by checking a post by paypal_mike on page 8 about "SOAP Logging". Then check what the currency code that is being transferred to paypal. It could be that your localization setting inside osCommerce is messed up and set to the wrong currency. For example, mine was set to CAN in osCommerce. The correct one is CAD. It was a pain to change because something was just messed up.

 

You should see something like this in the xml log dump file:

<OrderTotal xsi:type="xsd:string" currencyID="CAN">0.01</OrderTotal>
<ItemTotal xsi:type="xsd:string" currencyID="CAN">0.01</ItemTotal>
<ShippingTotal xsi:type="xsd:string" currencyID="CAN">0.00</ShippingTotal>
<TaxTotal xsi:type="xsd:string" currencyID="CAN">0.00</TaxTotal>

Link to comment
Share on other sites

Thanks a lot! I sent in the log for PayPal and it's exactly the problem - I am changing the currency code on the final DoExpressCheckoutPayment call to USD or some other currency.

 

Please see my log (The actual item is actually GBP 0.03 - I have no idea why it got passed on as USD 0.05 in the beginning):

 

[sTART]

I am passing USD on the SetExpressCheckout call for OrderTotal

<OrderTotal xsi:type="xsd:string" currencyID="USD">0.05</OrderTotal>

.

.

.

and then I am passing GBP on the DoExpressCheckoutPayment call<OrderTotal xsi:type="xsd:string" currencyID="GBP">0.05</OrderTotal>

<ItemTotal xsi:type="xsd:string" currencyID="GBP">0.05</ItemTotal>

<ShippingTotal xsi:type="xsd:string" currencyID="GBP">0.00</ShippingTotal>

<TaxTotal xsi:type="xsd:string" currencyID="GBP">0.00</TaxTotal>

[END]

 

If I fix the code that is making the SetExpressCheckout call it should work.

 

It will be greatly appreciated if someone can point me to the right direction on fixing it.

 

Thanks a zillion!

Link to comment
Share on other sites

Thanks a lot! I sent in the log for PayPal and it's exactly the problem - I am changing the currency code on the final DoExpressCheckoutPayment call to USD or some other currency.

 

Please see my log (The actual item is actually GBP 0.03 - I have no idea why it got passed on as USD 0.05 in the beginning):

 

[sTART]

I am passing USD on the SetExpressCheckout call for OrderTotal

<OrderTotal xsi:type="xsd:string" currencyID="USD">0.05</OrderTotal>

.

.

.

and then I am passing GBP on the DoExpressCheckoutPayment call<OrderTotal xsi:type="xsd:string" currencyID="GBP">0.05</OrderTotal>

<ItemTotal xsi:type="xsd:string" currencyID="GBP">0.05</ItemTotal>

<ShippingTotal xsi:type="xsd:string" currencyID="GBP">0.00</ShippingTotal>

<TaxTotal xsi:type="xsd:string" currencyID="GBP">0.00</TaxTotal>

[END]

 

If I fix the code that is making the SetExpressCheckout call it should work.

 

It will be greatly appreciated if someone can point me to the right direction on fixing it.

 

Thanks a zillion!

 

I don't remember where it's coming from but this is what I did to get CAD working (it's kinda gheto, but did the trick):

1) Backup your files and your database

2) Open the includes/modules/payment/paypal_wpp.php file

3) Find all instances of USD, replace them with GBP

4) Save and upload your payap_wpp.php

5) Now, for the WPP contribution, USD is probably still inside your database, so you can either copy out your settings for the WPP and remove, then install the module to have it re-do the settings, or do what I did:

 

Just use PHP MyAdmin (back your db), near the last few rows in the configuration table, you'll see 'Transaction Currency', 'Always USD' and 'tep_cfg_select_option(array(\'Always USD\'. Change those 2 instances of 'USD' to 'GBP' and you should be good to go.

 

I know there has gotta be a better way of doing this, but I didn't plan to use USD for mine at all, so it worked for me.

 

Also, you should also double check your osCommerce localization settings in 'admin' -> 'localization', but judging by your SOAP log, the localization appears to be fine.

Link to comment
Share on other sites

Does anyone know where to look for the currency code on the final DoExpressCheckoutPayment call? Which file is it located?

 

Also, is there a simple way to log the API requests and responses so that I can send the log to PayPal?

 

Thanks a lot!

 

Try changing this line:

 

$ot->setattr('currencyID', $wpp_currency);

 

to this:

 

$ot->setattr('currencyID', 'USD');

 

I've hardcoded it into v0.6.

Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail.

Link to comment
Share on other sites

AWESOME THANKS! Did I overlook the pear installation in the instructions for this module? I remember reading that Pear was optional. I'll install. Thanks!

 

The option is whether you download and install the pear modules using PEAR or whether you just download mine and use those.

Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail.

Link to comment
Share on other sites

Ok, I tried again from scratch and this is what I figured out: for shipping rates to be returned correctly and for the shipping address to be populated correctly as well, then the shipping address selected via PayPal has to be the same as the customers default shipping address. So this is really a problem that's seen when the user is a) already a store customer (has an account) and B) wants to ship to a gift address. That's not to say it wouldn't happen to a non-customer but there wouldn't be anywhere for "ghost" shipping data to come from in that case. At least, I hope not.

 

Also, I'm being logged in to my osC store if I use PayPal EC, even if I never enter my osC password. I think there was some discussion of this at one point. It seems ok because if it were a problem of fraud, the crook would have already cracked the user's PayPal account, which is far worse than being able to log in to an online store. Also it is highly unlikely that just the right sequence of events would occur to allow this to happen. But, it's questionable.

 

Happy Holidays, buddy!

Stew

 

 

You're right, Stew, there is no support for gift addresses. Maybe I should change it so that if they change the shipping address and mark it as a gift shipment, that it'll give paypal the shipping address they want to see but storing the order with the correct shipping address.

Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail.

Link to comment
Share on other sites

This maybe a stupid question and I apologize ahead, but regarding the following code in paypal_wpp.php:

 

//As PayPal only accepts USD at this time, this conditional is useless, but written for when they start accepting other forms of currency
  switch (MODULE_PAYMENT_PAYPAL_DP_CURRENCY) {
  default:
	$currency_id = 'GBP';
	break;
  }

 

Is there a way to modify $currency_id = 'GBP' to something like $currency_id = 'USD' or 'GBP' or 'EUR', etc.? Since hardcoding $currency_id to GBP will confine PayPal to process GBP only.

Link to comment
Share on other sites

You're right, Stew, there is no support for gift addresses. Maybe I should change it so that if they change the shipping address and mark it as a gift shipment, that it'll give paypal the shipping address they want to see but storing the order with the correct shipping address.

Great Contrib, I have installed WPP and it works (live). I receive payments and overcame the first problem (var $timeout = 120) by reading the install files.

 

I have read the forums but can't seem to find a solution for the shipping address not being passed on to paypal when using direct payment option. What's the solution to passing on this information?

 

Also my pear directory and subdirectory seem to be visible, by typing in their respective urls. What can I do about this?

Link to comment
Share on other sites

Great Contrib, I have installed WPP and it works (live). I receive payments and overcame the first problem (var $timeout = 120) by reading the install files.

 

I have read the forums but can't seem to find a solution for the shipping address not being passed on to paypal when using direct payment option. What's the solution to passing on this information?

 

Also my pear directory and subdirectory seem to be visible, by typing in their respective urls. What can I do about this?

 

It passes their billing address because that's what paypal needs to approve their card. It's been so long I don't remember if there are placeholders for a shipping address. If there are, I'll look into adding it in v0.6.

 

Put the pear modules below your public_html folder. If you can't do that, rename the pear directory to somethiing random or put in a .htaccess file denying all access.

Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail.

Link to comment
Share on other sites

Hello,

 

I just set up my store and I am ready to install the paypal checkout. I want to install the PayPal Website Payments Pro, not the EC one, so which file do I install? I want the payment system integrated with my store so the user never has to see the Paypal site. Any help would be greatly appreciated. TIA

Link to comment
Share on other sites

Hello,

 

I just set up my store and I am ready to install the paypal checkout. I want to install the PayPal Website Payments Pro, not the EC one, so which file do I install? I want the payment system integrated with my store so the user never has to see the Paypal site. Any help would be greatly appreciated. TIA

 

WPP is linked to EC- you can't have Pro without Express Checkout. If they pay with a credit card, they never see PayPal's site, but if they want to pay with PayPal they can do that too.

Do, or do not. There is no try.

 

Order Editor 5.0.6 "Ultra Violet" is now available!

For support or to post comments, suggestions, etc, please visit the Order Editor support thread.

Link to comment
Share on other sites

i'm encouraged by the numerous reports of success with this module, but unfortunately i'm having trouble getting it up and running, and this is no doubt due to my own lack of understanding.

 

at present, i have installed:

 

os.commerce 2.2ms2

paypal_wpp_0.5 (including the pear modules)

 

in addition to installing the pear modules, i am under the impression that i also need to install the PayPal SDK.

 

should the WPP pear modules and the SDK be in the same folder? different folders? I notice that some of the files are similar, which makes me think that one set might be used to overwrite the other.

 

simple folder structure examples would be appreciated.

Link to comment
Share on other sites

i'm encouraged by the numerous reports of success with this module, but unfortunately i'm having trouble getting it up and running, and this is no doubt due to my own lack of understanding.

 

at present, i have installed:

 

os.commerce 2.2ms2

paypal_wpp_0.5 (including the pear modules)

 

in addition to installing the pear modules, i am under the impression that i also need to install the PayPal SDK.

 

should the WPP pear modules and the SDK be in the same folder? different folders? I notice that some of the files are similar, which makes me think that one set might be used to overwrite the other.

 

simple folder structure examples would be appreciated.

 

I didn't install Paypal SDK, I did register to get the API certificate login and password. Though I went live from word go so if you are wanting to test before going live you probably need SDK.

Link to comment
Share on other sites

in addition to installing the pear modules, i am under the impression that i also need to install the PayPal SDK.

 

No, all the pear modules you need are contained in those two zip files.

 

should the WPP pear modules and the SDK be in the same folder? different folders? I notice that some of the files are similar, which makes me think that one set might be used to overwrite the other.

 

It doesn't matter where you put them, just make sure the path in the module's settings are correct.

Please use the forums for support! I am happy to help you here, but I am unable to offer free technical support over instant messenger or e-mail.

Link to comment
Share on other sites

No, all the pear modules you need are contained in those two zip files.

It doesn't matter where you put them, just make sure the path in the module's settings are correct.

 

simple enough, thanks.

 

so now i've double-checked all my settings, and uploaded pear.php to my "catalog" folder as i found it was missing, but still seem to get a blank page when i click the "check out with paypal" button.

 

in my error log, i see this, which it seems a few people have encountered, though i can't find a solution:

 

PHP Fatal error: paypal_init(): Failed opening required 'Services/PayPal.php' (include_path='.:/usr/share/pear') in .../httpdocs/includes/modules/payment/paypal_wpp.php on line 273

Link to comment
Share on other sites

Did install version 0.5.When i click on ec button for moving to paypal I get a fatal error execution time of 30 secs over.

I di change the time to 120 seconds but then to same error .

 

My analysis was that CURL was to send some file thru a command exec_curl($ch)

but paypal didnt replied.

My Queries are

1)If iis is a proxy server ( I had sent an email to My service provider to confirm on that )

what steps should I take.

2)can it be anyway due to SSL ( I tried withh SSL too and failed )

3)can there be nay other reason ( curl is tested and is runing )

 

CURL support enabled

CURL Information libcurl/7.13.1 OpenSSL/0.9.6m zlib/1.1.4

 

Had implemented on lot many sites but this sit e is giving Me problems.

 

Any help will be highly appreciated.

 

 

Regards,

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

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