Jump to content


Corporate Sponsors


Latest News: (loading..)

* * * * * 12 votes

PayPal WPP Direct Payments & Express Checkout Support


4281 replies to this topic

#21 dynamoeffects

  • Community Member
  • 1,646 posts
  • Real Name:Brian Burton
  • Gender:Male
  • Location:Italy

Posted 13 October 2005, 09:11

View Postken.yong, on Oct 13 2005, 12:58 AM, said:

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

Change the $timeout variable in /catalog/pear/Services/PayPal/SOAP/Transport/HTTP.php to 300 and see if that fixes your problem. If it doesn't go to PayPal at all, either your API username/password are wrong, your certificate isn't installed or is corrupt, or it's just timing out. In this next version there's better error handling, so it'll be easier to debug this kindof stuff. (Unless you get this damn generic error message that I've been getting)

Thanks for the compliment. What's funny is I've been fixing the FUBAR'd formatting that Notepad++ did where it seemingly switched randomly between spaces and tabs. The code looks beautiful in Notepad++, but when looking at it on my server through vi, the first words out of my mouth were "GAH!".
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.

#22 dynamoeffects

  • Community Member
  • 1,646 posts
  • Real Name:Brian Burton
  • Gender:Male
  • Location:Italy

Posted 13 October 2005, 10:10

Finally, figured it out!!

It looks like if your Sandbox user is a verified customer (meaning there's a bank account attached to it), that it'll throw up the "This transaction cannot complete successfully" error. Looks like a bug in the Sandbox. I'm willing to bet that the fake bank account number they're using in the Sandbox is depleted and when it tries to pull money out, it just fails.

Can anyone else duplicate this error?
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.

#23 bharper

  • Community Member
  • 8 posts
  • Real Name:Brad Harper

Posted 13 October 2005, 11:46

OK, I went throught the install yesterday and I have a few questions.

1) To alternate between sandbox/live testing do I need to request api access in both environments?

2) I still get the generic "Your card has been denied...." error everytime I try to use a credit card. Is the snippett of code mentioned above supposed to give me more descriptive error?

3)Would I get this error if my api access credentials were incorrect?

Thanks for your time.

-bharper

Edited by bharper, 13 October 2005, 11:47.


#24 dynamoeffects

  • Community Member
  • 1,646 posts
  • Real Name:Brian Burton
  • Gender:Male
  • Location:Italy

Posted 13 October 2005, 11:59

1. Yes, you need an API certificate and username/password in both environments.

2. Are you using a test card number or a real one? If you use a test card number in a live environment, it'll fail.

3. Could be, but because the error responses in 0.1 are so worthless it's tough to say.

Version 0.2 should be finished today, which is much more stable. In the mean time, if you don't have a sandbox account, go ahead and sign up and get your API cert and credentials so you can test it out there.
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.

#25 bharper

  • Community Member
  • 8 posts
  • Real Name:Brad Harper

Posted 13 October 2005, 12:37

View Postdynamoeffects, on Oct 13 2005, 07:59 AM, said:

3. Could be, but because the error responses in 0.1 are so worthless it's tough to say.


It was indeed my api access credentials. It worked first time through after I got those right. I sure am glad you can issue refunds for 60 days!

So, Im not quite clear about switching from sandbox to live testing... do i need to have both api access certs in the wpp_cert directory or do I switch them out? I guess i could leave them both in and just point the module to the correct one depending on live/sandbox.

Thanks again for your time/code. Nice work.

-bh

Edited by bharper, 13 October 2005, 12:41.


#26 dynamoeffects

  • Community Member
  • 1,646 posts
  • Real Name:Brian Burton
  • Gender:Male
  • Location:Italy

Posted 13 October 2005, 12:46

Version 0.2 has just been finished and uploaded!

If you installed 0.1, you're going to have to go through all the OSC core files you modified in the first one and redo them. Sorry about that, but that shouldn't happen again. Also note the the paypal_wpp.sql file adds one extra column that v0.1 didn't, so don't forget to do import that.

The zip file alone is 20k larger than v0.1's, so many changes have been made and a few more core files have been modified. Automatic account creation is now optional (a temporary account is still created, but deleted at the end of checkout) and error messages now include the ones returned from PayPal. The changelog in the readme file lists all the updates.

Thanks to everyone who sent me bug reports, this version is MUCH more stable than 0.1 and better suited for a production environment.

Edited by dynamoeffects, 13 October 2005, 12:49.

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.

#27 bharper

  • Community Member
  • 8 posts
  • Real Name:Brad Harper

Posted 13 October 2005, 15:12

This is probably due to something else I did .... I get this when trying to go to "My Account" or "Cart"

Warning: Cannot modify header information - headers already sent by (output started at /usr/www/users/gf/gf/catalog/includes/languages/english.php:341) in /usr/www/users/gf/gf/catalog/includes/functions/general.php on line 29

Have you seen this before?

I'm kinda new to php BTW - java guy.

-bh

#28 dynamoeffects

  • Community Member
  • 1,646 posts
  • Real Name:Brian Burton
  • Gender:Male
  • Location:Italy

Posted 13 October 2005, 15:15

It'll do that if there are carriage returns under the last ?>
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.

#29 bharper

  • Community Member
  • 8 posts
  • Real Name:Brad Harper

Posted 13 October 2005, 15:22

View Postdynamoeffects, on Oct 13 2005, 11:15 AM, said:

It'll do that if there are carriage returns under the last ?>


Thanks. Sorry for the remedial PHP questions.. I haven't learned all the quirks yet.

-bh

#30 ken.yong

  • Community Member
  • 131 posts
  • Real Name:Ken Yong

Posted 13 October 2005, 16:01

Hi, Dynamo,

I have updated to the new version. I get the following error:

[ERROR]
An error occured when we tried to contact PayPal's servers.

()
[/ERROR]

It should be my individual Paypal problem, right? I have already changed this line:

var $timeout = 4;

to

var $timeout = 60;

Ken

Edited by ken.yong, 13 October 2005, 16:02.


#31 SteveDallas

  • Community Member
  • 719 posts
  • Real Name:Glen
  • Gender:Male
  • Location:Alabama, US

Posted 13 October 2005, 16:32

I'm getting the same error:

An error occured when we tried to contact PayPal's servers.

()

#32 dynamoeffects

  • Community Member
  • 1,646 posts
  • Real Name:Brian Burton
  • Gender:Male
  • Location:Italy

Posted 13 October 2005, 17:04

Very very strange, it's working for me. Is this when you click the Express Checkout button, or try to use Direct Payment?
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.

#33 ken.yong

  • Community Member
  • 131 posts
  • Real Name:Ken Yong

Posted 13 October 2005, 17:14

View Postdynamoeffects, on Oct 13 2005, 01:04 PM, said:

Very very strange, it's working for me. Is this when you click the Express Checkout button, or try to use Direct Payment?

Hi, Dynamo,

It's when I click the Express Checkout button.

Ken

#34 dynamoeffects

  • Community Member
  • 1,646 posts
  • Real Name:Brian Burton
  • Gender:Male
  • Location:Italy

Posted 13 October 2005, 17:15

When you removed the old payment module and installed this one, did you remember to redo your settings? I just did an order on my dev cart and it completed and added the money to my sandbox account, so not sure what's going on. The files I'm using are the same ones I packaged and uploaded.
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.

#35 ken.yong

  • Community Member
  • 131 posts
  • Real Name:Ken Yong

Posted 13 October 2005, 17:16

Yes, I have written down the settings and retyped those in. It still said "An error occured when we tried to contact PayPal's servers."

Ken

#36 SteveDallas

  • Community Member
  • 719 posts
  • Real Name:Glen
  • Gender:Male
  • Location:Alabama, US

Posted 13 October 2005, 17:21

In my case, I had renamed the certificate from cert_key_pem.txt to cert_key_pem_sandbox.txt and forgot to update it. EC is working now. On to test DP.

#37 ken.yong

  • Community Member
  • 131 posts
  • Real Name:Ken Yong

Posted 13 October 2005, 17:23

I think I might have a clue... I am hosting with GoDaddy, they require that I use their proxy for all SSL CURL post. Do you know where should I put curl_setopt functions for proxy in your php files?

I am confident it will work this time when the proxy thing goes through.

THANK YOU VERY MUCH! DYNAMO!!! I REALLY REALLY APPRECIATE ALL YOUR CONTRIBUTIONS!

Ken

Edited by ken.yong, 13 October 2005, 17:24.


#38 dynamoeffects

  • Community Member
  • 1,646 posts
  • Real Name:Brian Burton
  • Gender:Male
  • Location:Italy

Posted 13 October 2005, 17:36

I have already found a bug in create_account.php, though. I've uploaded a new version of that page to the contributions. Use it to overwrite or modify your existing create_account.php.

Ken, I'm willing to bet your solution is similar to SteveDallas'. Recheck your settings, make sure the certificate is still in place, and try again.

I honestly never expected this module to be this complex. Sheesh!
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.

#39 dynamoeffects

  • Community Member
  • 1,646 posts
  • Real Name:Brian Burton
  • Gender:Male
  • Location:Italy

Posted 13 October 2005, 18:04

Ken, it'd be somewhere in the pear modules, but couldn't tell you where off the top of my head.
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.

#40 SteveDallas

  • Community Member
  • 719 posts
  • Real Name:Glen
  • Gender:Male
  • Location:Alabama, US

Posted 13 October 2005, 18:30

Brian,
I want to thank you for all your hard work on this module. I have successfully processed both Express Checkout and Direct Payment transactions in the Sandbox.

I have some order flow and cosmetic issues that I'd like to address:

1. If you log in or checkout without an account (PWA), the EC button appears at the top of checkout_shipping.php. I think that a better placement would be on checkout_payment.php, along with the other payment methods.

My reasoning is that a customer, who either logged in, created an account, or used PWA to checkout, has already been presented the EC button, so there is no reason to present it a second time. A returning customer who logged in before checkout has already provided his shipping information, so should be able to confirm it and then select EC on the payments page. This appears to be in harmony with PayPal's business rules.

2. When Express Checkout has been selected as the payment method, the checkout confirmation page displays the payment method as "PayPal Direct Payment & Express Checkout". I realize that this is the module name, but is there a way to display it as "PayPal Express Checkout" without splitting the payment module into two parts?

3. When presenting payment options, checkout_payment.php displays the module name, but the module only offers the direct payment options. In addition, the PayPal name shouldn't even appear for direct payments. A generic "Credit Card" text would be more appropriate. I haven't dug into the architecture deeply enough to determine whether this can be done easily.

I'm curious as to what others think about these issues.

--Glen