PayPal WPP Direct Payments & Express Checkout Support
#1
Posted 11 October 2005, 09:20
The contribution can be found here:
http://www.oscommerce.com/community/contributions,3647
#2
Posted 11 October 2005, 10:03
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.
#3
Posted 11 October 2005, 14:55
dynamoeffects, on Oct 11 2005, 03:33 PM, said:
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.
Thanks for the module which was much awaited I will check on this this weekend and will give My findings.
Satish
Check My About US For who am I and what My company does.
#4
Posted 11 October 2005, 20:17
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.
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
Posted 11 October 2005, 21:43
djmonkey1, on Oct 11 2005, 03:17 PM, said:
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
Posted 11 October 2005, 21:51
#7
Posted 12 October 2005, 01:59
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
Posted 12 October 2005, 02:59
#9
Posted 12 October 2005, 08:41
ken.yong, on Oct 12 2005, 03:59 AM, said:
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.
#10
Posted 12 October 2005, 09:26
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.
#11
Posted 12 October 2005, 11:35
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
Posted 12 October 2005, 12:46
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.
#13
Posted 12 October 2005, 19:44
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
Posted 12 October 2005, 20:34
#15
Posted 12 October 2005, 20:43
kinetek, on Oct 12 2005, 04:34 PM, said:
Actually I got the same problem too. I used a real card to try and it got declined as well.
#16
Posted 12 October 2005, 21:32
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
Posted 12 October 2005, 22:14
kinetek, on Oct 12 2005, 05:32 PM, said:
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
Posted 12 October 2005, 22:26
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.
#19
Posted 12 October 2005, 22:58
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
Posted 12 October 2005, 23:42














