Jump to content



Photo
* * * * * 12 votes

PayPal WPP Direct Payments & Express Checkout Support


  • Please log in to reply
4289 replies to this topic

#1   dynamoeffects

dynamoeffects
  • Members
  • 1,646 posts
  • Real Name:Brian Burton
  • Gender:Male
  • Location:Italy

Posted 11 October 2005 - 09:20

This is the support thread for the PayPal Direct Payments & Express Checkout module. Please post any bugs or errors you see while using it so that they can be fixed.

The contribution can be found here:
http://www.oscommerc...tributions,3647
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.

#2   dynamoeffects

dynamoeffects
  • Members
  • 1,646 posts
  • Real Name:Brian Burton
  • Gender:Male
  • Location:Italy

Posted 11 October 2005 - 10:03

I forgot to mention that this probably won't play well if you've installed the Purchase Without Account contribution, but haven't tested it to know for sure.

This current version will create an account for the customer if one doesn't exist, but in a future version, I think I'm going to make that optional where it just adds the information to the orders table. I personally wouldn't like that as it's easier to keep track of repeat customers if they have an account, but everyone has their own methods.

Also, I have uploaded the pear modules to the link above, but the zip file was a little over 300k, so it should be up once approved by a mod.

Edited by dynamoeffects, 11 October 2005 - 10:05.

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.

#3   satish

satish
  • Members
  • 5,350 posts
  • Real Name:Satish Mantri
  • Gender:Male
  • Location:Nagpur(India)

Posted 11 October 2005 - 14:55

I forgot to mention that this probably won't play well if you've installed the Purchase Without Account contribution, but haven't tested it to know for sure.

This current version will create an account for the customer if one doesn't exist, but in a future version, I think I'm going to make that optional where it just adds the information to the orders table. I personally wouldn't like that as it's easier to keep track of repeat customers if they have an account, but everyone has their own methods.

Also, I have uploaded the pear modules to the link above, but the zip file was a little over 300k, so it should be up once approved by a mod.

HI Dynamo,
Thanks for the module which was much awaited I will check on this this weekend and will give My findings.


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.

#4   djmonkey1

djmonkey1
  • Members
  • 2,154 posts
  • Real Name:Stew
  • Gender:Male
  • Location:Winchester, VA

Posted 11 October 2005 - 20:17

I also imagine that it may cause problems with PWA. I guess I'll go find out....

As far as automatically creating an account for someone, I'd say that's a gray area at best. My two cents is to change that.
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.

#5   SteveDallas

SteveDallas
  • Members
  • 725 posts
  • Real Name:Glen
  • Gender:Male
  • Location:Alabama, US

Posted 11 October 2005 - 21:43

I also imagine that it may cause problems with PWA. I guess I'll go find out....

As far as automatically creating an account for someone, I'd say that's a gray area at best. My two cents is to change that.


I'm working on integrating it with PWA. The login page will show PayPal Express Checkout, PWA, New Account, and Log In boxes, using the vertical PWA format. This requires a bit of cosmetic work on the EC addition to login.php. I've almost got it working but had to interrupt work to ship some product. I'll let you know when it's done.

I agree with djmonkey1 about not automatically creating accounts.

#6   dynamoeffects

dynamoeffects
  • Members
  • 1,646 posts
  • Real Name:Brian Burton
  • Gender:Male
  • Location:Italy

Posted 11 October 2005 - 21:51

Sounds like a concensus. /smile.gif' class='bbc_emoticon' alt=':)' /> I'll make it an option in the next version.
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.

#7   ken.yong

ken.yong
  • Members
  • 131 posts
  • Real Name:Ken Yong

Posted 12 October 2005 - 01:59

Hi, Dynamo,

I have tried out your module (which is really a great one btw) and encountered the following error:

When I go to the checkout page, it shows login.php correctly with the Express Checkout button. However, once I clicked on the Express Checkout Button, it shows:

Fatal error: Call to undefined function: array() in html/login.php on line 93

Now I try to go back to login.php, it does not even displayed properly - I can only see the above error message. Reloading doesn't help at all.

Ken

P.S. Sorry, I forgot to also ask how to accept Transaction Currency other than USD and EUR? Thanks so much!

Edited by ken.yong, 12 October 2005 - 02:00.


#8   cwdmark

cwdmark
  • Members
  • 46 posts
  • Real Name:Mark

Posted 12 October 2005 - 02:59

thanks for the add, im going to test it out this weekend as well with the launch of one of my sites. thanks so much! we've been waiting so long for it.

#9   dynamoeffects

dynamoeffects
  • Members
  • 1,646 posts
  • Real Name:Brian Burton
  • Gender:Male
  • Location:Italy

Posted 12 October 2005 - 08:41

Fatal error: Call to undefined function: array() in html/login.php on line 93

P.S. Sorry, I forgot to also ask how to accept Transaction Currency other than USD and EUR? Thanks so much!



Actually, PayPal's API only supports USD right now. I just put that USD/EUR option in there for future development.

Did you overwrite your login.php with the version in the zip file, or did you manually update it? Post a few lines of your code around line 93. array() is a core function in PHP, so you probably just have a syntax error in there.


================================================

Some development notes:
-I'm working on making the automatic account creation optional

-Also, I'm going to make it optional if you want to automatically log the customer in if the email address returned from paypal is the same as one of your existing customers. At first I worried about that being a security risk, but an attacker would have to have already compromised the victim's email account, in which case they could just click on "Forgot my Password" and break in a whole lot easier.

-Last thing on the agenda is to dump the pear modules and whittle them down to one or two classes. But that's a low priority.
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.

#10   dynamoeffects

dynamoeffects
  • Members
  • 1,646 posts
  • Real Name:Brian Burton
  • Gender:Male
  • Location:Italy

Posted 12 October 2005 - 09:26

SYNTAX ERROR IN V0.1

Somehow, two lines got truncated and the ends pushed to the next line. In the file:
/catalog/includes/modules/payment/paypal_wpp.php

On the ends of lines 460 and 470, the text "me'];" got pushed to the next line. Just fix it from:

$order->billing['name'] = $paypal_ec_payer_info['payer_firstname'] . ' ' . $paypal_ec_payer_info['payer_lastna
me'];

$order->delivery['name'] = $paypal_ec_payer_info['payer_firstname'] . ' ' . $paypal_ec_payer_info['payer_lastna
me'];

to:
$order->billing['name'] = $paypal_ec_payer_info['payer_firstname'] . ' ' . $paypal_ec_payer_info['payer_lastname'];

$order->delivery['name'] = $paypal_ec_payer_info['payer_firstname'] . ' ' . $paypal_ec_payer_info['payer_lastname'];


Sorry about that, but this is an alpha version. Unless you want to help root out the bugs, I suggest everyone wait until v0.2.
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.

#11   Sid04

Sid04
  • Members
  • 433 posts
  • Real Name:Bob bob

Posted 12 October 2005 - 11:35

im going to try to find some time in the next couple days to install and run some transactions through the sandbox.

So, is the "checkout without account" type mod going to be worked into this(not just for express checkout)? Im getting alot of feedback that customers want this....im id like to tackle that at the same time that I do this contrib if ti deals with the same files.

Also, auto-logging the customers on if their paypal address matches one of your customer email addresses sounds like a decent idea....but I guess if they are paying with paypal there wouldnt be much sense in logging them in would there? Or is that just an easy way of having their order history under their regular customer login?

#12   dynamoeffects

dynamoeffects
  • Members
  • 1,646 posts
  • Real Name:Brian Burton
  • Gender:Male
  • Location:Italy

Posted 12 October 2005 - 12:46

Well, here's the fat and skinny of it. If you're using the PWA mod, it creates an account for your customer, it just doesn't tell them about it. My mod does the same (except it tells them about it), but in version 0.2 of this payment module, you'll only be able to disable whether it tells them about the account or not. I'm adding a text field into the settings area so that you can set the default password to the same as the one you use for PWA, so that the two should theoretically work hand in hand. Unfortunately, theoretical PHP is like quantum physics -- just about anything's possible, but much of it will never actually work in the real world.

The reason that it's necessary for all customers to have an account is that many many many other checkout contributions refer to the database using the customer's ID. If I were to make this just push the order into into the $order object without creating an account, many of the contribs that people have put into their stores would simply stop functioning.

================================

And to those who've installed 0.1, I'm going to have to apologize in advance. I forgot to make it hide the "Express Checkout" boxes when you've either removed or disabled this payment module, so you're going to have to redo the modifications in login.php and checkout_shipping.php.
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.

#13   ken.yong

ken.yong
  • Members
  • 131 posts
  • Real Name:Ken Yong

Posted 12 October 2005 - 19:44

Hi, Dynamo,

Here is the original script in the login.php file which has the syntax error (line 93 on login.php):

//---PayPal WPP Modification START ---//
  if (tep_session_is_registered('paypal_error')) {
	$checkout_login = true;
	$messageStack->add('login', $_SESSION('paypal_error'));
	tep_session_unregister('paypal_error');
  }
//---PayPal WPP Modification END ---//

I actually overwrote the file with the your file, i.e. I did not make any modifications.

Thanks again!

#14   kinetek

kinetek
  • Members
  • 172 posts
  • Real Name:paul kim
  • Gender:Male
  • Location:los angeles, ca

Posted 12 October 2005 - 20:34

Great contribution dynamo. Is there any way of displaying the exact error code from paypal? Every card I try is getting declined but that is just a generic messsage for every non-successful transaction. I need to know what the exact problem is so I can fix it. Thanks

#15   ken.yong

ken.yong
  • Members
  • 131 posts
  • Real Name:Ken Yong

Posted 12 October 2005 - 20:43

Great contribution dynamo. Is there any way of displaying the exact error code from paypal? Every card I try is getting declined but that is just a generic messsage for every non-successful transaction. I need to know what the exact problem is so I can fix it. Thanks


Actually I got the same problem too. I used a real card to try and it got declined as well.

#16   kinetek

kinetek
  • Members
  • 172 posts
  • Real Name:paul kim
  • Gender:Male
  • Location:los angeles, ca

Posted 12 October 2005 - 21:32

Okay I found a way to get the error code and message. This is the error message:

Direct Payment has been disabled on this account. Transaction has not been processed.

I am using a sandbox business account and have everything set up. I also have live business account and tried it there and it didn't seem to go through too.

#17   kinetek

kinetek
  • Members
  • 172 posts
  • Real Name:paul kim
  • Gender:Male
  • Location:los angeles, ca

Posted 12 October 2005 - 22:14

Okay I found a way to get the error code and message. This is the error message:

Direct Payment has been disabled on this account. Transaction has not been processed.

I am using a sandbox business account and have everything set up. I also have live business account and tried it there and it didn't seem to go through too.



Okay, i got it to work. I think my sandbox account was just misconfigured somehow. Then I ran into timeout errors. I think it should be mandatory that you raise $timeout in /catalog/pear/Services/PayPal/SOAP/Transport/HTTP.php

#18   dynamoeffects

dynamoeffects
  • Members
  • 1,646 posts
  • Real Name:Brian Burton
  • Gender:Male
  • Location:Italy

Posted 12 October 2005 - 22:26

Ken, I actually ran across that error for the first time today too. Strange how it didn't show up before I packaged it. Change:

Change the line:
$messageStack->add('login', $_SESSION('paypal_error'));

to

$messageStack->add('login', $paypal_error);

You'll also have to do that in checkout_shipping.php.


I've actually been getting errors all day trying to process. Unfortunately, it's just a generic "This transaction couldn't be processed. Tell the customer to use another form of payment" when using Express Checkout. Still not sure if it's the code, one of my sandbox accounts, or an act of God.

In this next version, it'll return the error message along with the error code received from PayPal. I should have the revised version out in a couple days.
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.

#19   ken.yong

ken.yong
  • Members
  • 131 posts
  • Real Name:Ken Yong

Posted 12 October 2005 - 22:58

Hi, Dynamo,

After I changed it and click on the Express Checkout button, I got returned to the login page and it says at the top in a pink box:

payment_error=paypal_wpp&error=An+error+occured+when+we+tried+to+process+your+credit+card.+
+Please+try+again%2C+or+if+you+continue+to+have+problems%2C+please+choose+another+form+of+
payment.++Thanks%21

It didn't take me to the Paypal website at all. I guess this is the same error when you tried all day today?!

BTW, GREAT GREAT CODE!! Clean and easy to follow/modify.

Ken

Edited by ken.yong, 12 October 2005 - 22:59.


#20   linuxdave

linuxdave
  • Members
  • 47 posts
  • Real Name:Dave V
  • Location:East Lansing, MI

Posted 12 October 2005 - 23:42

Does someone happen to have a live site that I could look at with this installed?
LinuxDave