Paypal WPS configuration

Posts: 116
Joined: 08/08/2007
Brain Stormer

I'm finally trying to get Web Payments Standard enabled and working on a site. I've got one product and it looks good. I've got my pp business account (about a month ago) but haven't looked at it since.

1) Does anybody have instructions for how to enable this on the uc side of things?

i've been to the payments section at admin/store/settings/payment and i don't see any where to enter in a paypal id or anything? don't i need to do that? i can enter an email address - maybe that's all i need to do.

also it only specifies 'default gateway' in th dropdown box as 'none'. which i think is probably ok since this isn't really a gateway right?

2) Also, i can specify the sandbox setting in uc pp wps section for testing. Do i need to do something on the PP end to actually synch and test the sandbox other than just making the setting in uc?

3) I have disabled the ability for users to create accounts. i imagine that the cart will NOT checkout if i disable this feature correct?

With user account creation disabled, would i still be able to create orders on the admin end and then tell customers their id/password combos to login with. i know that's lame and i'm not intending on doing it but i thought i'd ask just to see how this works from a permissions standpoint.

4) BIG ONE! i recall a thread before the crash taht mentioned you couldn't use securepages module (or ssl) with WPS. i think that someone else figured out that by disabling securepages module, they were able to get past a strange error in WPS and make it work.

Is this still the case? was it ever actually fixed or are people compromising the security of their sites so they can run WPS?

NOTE: since WPS already is secure amd all the touchy stuff is handled by PP on their servers, i won't be routing any ubercart menupaths to ssl via secure pages module. Instead, i'd like to use it ONLY NON WPS pages and menu paths like "user*" for logins and "admin*" for admin work.

5) Suggestion: When one enables the uc paypal mods, by default it enables Web payments pro and Express checkout. I found that rather confusing. It might be better to leave everything disabled and let store admins enable what they want manually.

thanks for any help. i really want to get this thing going!

Posts: 116
Joined: 08/08/2007
Brain Stormer

one other thing..

where do i specify the IPN for redirect back to uc?

Posts: 116
Joined: 08/08/2007
Brain Stormer

OK. it looks like i set the ipn in my PP account NOT uc settings. after looking at the code, i'm not certain but i think that ipn should be:

http://host/uc_paypal/ipn

is this correct? fyi, this should definitely be documented somewhere!

Also there is a setting in my PP account called 'Auto Return'. According to the PP agreement, that return page should provide "verbiage on the page displayed by the Return URL that will help the buyer understand that the payment has been made and that the transaction has been completed".

is this already defined by the pp module? if so what is the url?

I imagine it needs to be because it probably will check for success or failure and dynamically generate the appropriate message. fyi, this should definitely be documented somewhere!

Posts: 116
Joined: 08/08/2007
Brain Stormer

walking through this today answering more of my own questions...

1) mostly need to specify the email on your PP account. that is sufficient for this to work. not suer about the payment gateway but as stated before probably a no-op here.

2) sandbox requires a pp "sandbox" account which is separate from your std paypal account. at the time of this post you can register here:

https://developer.paypal.com/

i still haven't heard back yet but i imagine you set the payment settings in uc wps to 'sandbox' to allow this to work.

but i'm not sure if the uc testing module / gateway / sandbox is needed for wps sandbox. i imagine not.

i'm also wondering if i could use that module to test wps without having to signup for a wps sandbox account?

Posts: 116
Joined: 08/08/2007
Brain Stormer

Learning More all the time:

I wasn't excited about going with PP from the start based upon things i've heard about them. The devil's i the details so to speak. But for what i'm doing it's the only viable option as there is no upfront cost. Some things i found out today to pass on to others:

- PP likes to promote itself as a site that does NOT require a customer to create a PP account. which is one of the reason's i went with them in the first place. Well, that's a half truth. The real truth is that a customer won't have to sign up for an account the first 2 times they purchase. However, the 3rd time they will be forced to create an account. May or may not be a hastle for some but if you have repeat customers, i'd hate to have to sign up for a pp account if i didn't want to.

- If your customers don't have a pp account, the txn purchase will be limited to < $2000 or they must open a pp account.

- Although you can have 8 emails with a single business account, you really can't use a single business account for more than one website. The reason being that the brilliant folks at pp only give you a single ipn for all the 8 emails. That means 8 different sites would always report via ipn to the same single site. which is impractical. So if you want to open 4 small websites that don't generate a whole lot of money, you're forced to go down to the bank and open 4 separate business accounts and then create for separate PP accounts. I've got so many user/password combinations it's hard to keep track of all this stuff anymore.

fyi, something tells me they might used to have allowed multiple ipns per account but have discontinued the practice. the lady helping me had a slip of the tongue that led me to believe this. and she said she was going to look into if they could get them for me somehow.

just thought i'd pass this along.

Posts: 116
Joined: 08/08/2007
Brain Stormer

#3) it looks like this is working without enabling user acct self - registration.. is that correct?

I guess i'm starting to realize that you don't need to enable registration for user accts to work. If they exist and there is a user login box or user goes to /user/login they can login. I imagine, uc creates these accounts behind the scenes so they are available as well.

Don't know why my thick skull had trouble with that one Eye-wink

Posts: 116
Joined: 08/08/2007
Brain Stormer

Supposedly PP is NOT supposed to force you to create an account when paying for an order yet i've been testing it and it seems like it IS wanting you to create a password and automatically use your email address as the id for the account?

I've got it configured right in my pp account settings to NOT force users to create accounts.

wtf?

anybody else seeing this out there?

Posts: 109
Joined: 08/08/2007
Getting busy with the Ubercode.Internationalizationizer

i felt a bit bad that you were talking to yourself, so i thought i'd join you.

i've done sandbox testing for the standard website payments account. i found the sandbox environment overly complicated and a bit buggy. however, with persistance it was possible to get going in the end. i didn't find the uc side of things very complicated at all.

the only real problem i encountered was getting the order status to change from 'pending' to 'processing', which is addressed here:
http://www.ubercart.org/forum/support/150/order_status_after_paypal_ipn_...

Posts: 62
Joined: 08/31/2007
Bug Finder

Hello druru

You have to first enable Paypal module,
Then in Store >> Configuration >> Payment setting.

Posts: 62
Joined: 08/31/2007
Bug Finder

Hi megg

Me too tried to use Ubercart with Paypal Sandbox account.

But in vein.
I keep receiving "This invoice has already been paid. For more information, please contact the merchant."

Can you help me?

Posts: 116
Joined: 08/08/2007
Brain Stormer


i felt a bit bad that you were talking to yourself, so i thought i'd join you.

thanks Smiling..

fyi, i actually was posting back here (talking to myself) to share what i'm learning with others so they don't have to walk through this and waste a day for something that should be fairly simple to do.

also, you are correct. the uc side is NOT that complicated. however, if you've never worked with ecommerce or paypal, it's hard to know what needs to be set on their end and what needs to be set on this end. unless you know how to hunt through the code (which i do), the avg user is not going to know what the ipn should be. does uc define a pp 'auto return' page that incorporates the ipn info as to a failed or successful txn? i still don't know the answer to that question?

do i need the uc sandbox module for pp sandbox? still not clear. i figured i'd just skip the whole sandbox thing and try to get to real PP checkout and not actually submit the cc for now.

so my final questions have been narrowed down to why pp still wants to force the user to create an account even though i have that setting disabled on my pp account settings?

Posts: 109
Joined: 08/08/2007
Getting busy with the Ubercode.Internationalizationizer

druru, i'm sure this info is going to be useful for more people setting up their paypal payments. i'm still in the process myself, so i'll be referencing it, too! Smiling

@raddy:

I keep receiving "This invoice has already been paid. For more information, please contact the merchant."

Can you help me?

i haven't come across that particular error message, but having done a bit more work with sandbox today, i'm beginning to think that druru has the right idea in not using the sandbox at all. it's very frustrating and i'm not sure how reliable it is. i'm planning to make a product available for a very small amount and test it that way in real time.

oh, and just for the record, i didn't have to install any uc sandbox module. i just created a merchant account in sandbox (took me the best part of a day) and then verify it and then request api credentials and then use the api with the uc paypal module.

Posts: 116
Joined: 08/08/2007
Brain Stormer

my fear is that this thread becomes too long and ryan doesn't bother to read it to answer any of the questions Eye-wink

so far it doesn't look like ubercart is creating any of my customer accounts. i'm not sure if it only does that when the user has actually purchased the item on paypal and the ipn is returned. since i'm only testing as far as getting to the paypal checkout but never actually entering credit card info, that's probably plausible.

ryan, if you're out there, do you know when the user account gets created?

thanks

Posts: 116
Joined: 08/08/2007
Brain Stormer


oh, and just for the record, i didn't have to install any uc sandbox module. i just created a merchant account in sandbox (took me the best part of a day) and then verify it and then request api credentials and then use the api with the uc paypal module.

yeah, i didn't think the sandbox module was needed for WPS. instead you go to pp and create a sandbox account and then in uc paypal settings you point it to the sandbox (which points to the PP sandbox NOT the uc sandbox).

it looked like a lot of extra work though. so i never got around to doing it.

Posts: 62
Joined: 08/31/2007
Bug Finder

Hello druru

I don't think Ryan would reply to this thread,
But don't worry we shall still share our findings.

My findings.

* You have to fully configure the Paypal Sandbox's accounts by following this step-by-step instructions https://www.paypaldeveloper.com/pdn/board/message?board.id=sandbox&threa...

* Be sure to specify your Paypal's Sandbox account's business email address in "PayPal Website Payments Standard settings"
* Be sure to enter the the Paypal's Sandbox account's Personal email address when testing Paypal as a buyer.

* AFAIK Ubercart won't create create user account in drupal. i believe it would have its own set of records having customer names.

* Yup, you don't need to install any separate Paypal sandbox module. uc_paypal module has support for Paypal sandbox.

IPN is currently fishy in my end, i'll have to dig deeper to make it work properly

Posts: 62
Joined: 08/31/2007
Bug Finder

Hi megg

I have fixed the "This invoice has already been paid." error, after fully configuring the Paypal Sandbox accounts.

Isn't API credential only for Paypal Website Payment Pro ?

Posts: 5269
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Just a few answers in this thread, mimicking a little of this post.

On the UC side, you'll find the settings for various PayPal services in different places. Notably, you'll find the setting for Express Checkout and Website Payments Standards in the Payment methods form at /admin/store/settings/payment/edit/methods. The settings for the CC processor provided by Website Payments Pro are found in the Payment gateways settings at /admin/store/settings/payment/edit/gateways (which also has a few more settings for Express Checkout you'll need to configure). This means if you intend to use PayPal Express Checkout, you should configure PayPal in both places.

To use this module for testing, you actually need to create a Sandbox account for PayPal which functions like a normal PayPal account. You can do this through http://developer.paypal.com. You won't use your actual PayPal account for testing in this mode.

Ubercart does not require you to allow users to register prior to checkout, but I think you already figured this one out.

There was an issue where the Secure Pages module was screwing up form action URLs. I don't quite remember the fix for this, but I'll leave this alone for now until the topic comes up again. Smiling

I didn't realize some stuff was being enabled by default, but I may have had to do it to become PayPal Certified. Really, there just needs to be good documentation for the module. I'd give you a cookie if you wrote it!

Also, you don't need to fill in an IPN URL. This is provided in the API call by the module. You do need to make sure your IPN is turned on. And I do recommend turning on the auto return for website payments. The URL should be http://www.yoursite.com/uc_paypal/wps/complete. This will finish the order like a normally checked out order.

Ciao!

Posts: 116
Joined: 08/08/2007
Brain Stormer

Regarding the secure pages, i'm going to be jumping on that real quick. I wanted to make sure i got pp working first though. So i'll repost that to a new thread if a problem arises.

ryan, what about the passwords. If an account is created automatically for a user when does a password either get generated and mailed or is the user prompted to enter one. an account without an password is useless right.

i'm not sure if you're trying to keep the info in this thread but i broke out a separate post for all the user related issues so they could be confined to a single topic thread. i've got a few more related questions there as well.

if you can answer all my questions in the other threads related to PP WPS.. i'll bite the bullet and write a documentation page for PP WPS. you don't have to bribe me with a cookie Eye-wink but i need to get it working myself first and i probably won't be able to document until next week. AND i'll leave checkout express and payments pro to somebody else since i won't be using those myself.

i'd love to barter. I posted in the import / export thread about somebody doing a documentation of a real import with a sample product data record with product images and post that as a documentation page. Not sure anybody's going to bite on it though.

Regardless, i'll offer up some documentation on this sucker.

Posts: 116
Joined: 08/08/2007
Brain Stormer

The URL should be http://www.yoursite.com/uc_paypal/wps/complete.

ryan, is there anyway this can be passed from the form the same way that the ipn is???

I ask because once you hard code that info on the PP site, your locked into one UC site with on PP account. If that info can be passed on the form, then it would be possible to have multiple sites access and use a single PP business account!

Posts: 5269
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Yeah, you're right. I guess it will be stuck for now... Like I said, I tried using the API to specify the return URL but I couldn't get it to work. Maybe I was doing it wrong or the API just doesn't support it. If someone finds out it will work, I'll be happy to change it.

Posts: 116
Joined: 08/08/2007
Brain Stormer

That really sucks.

If a user checks out from one site, they're alwasy routed back to the primary site that has the "Auto Return" path. Which breaks the continuity of a user's site experience.. and means you have to open up another bank account for a site that may hardly see any business at all or justify it's own account..

SIDENOTE:

Tell you what, i just blasted through documentation for this WPS process. I want to get it off my plate now that it's done. I was going to add a book page but it doesn't seem like i can position it in the book heirarchy. maybe i do that after i actually create the node. tell me how to do it or create a starter page in the appropriate section where i can paste in my doco.

Or should i just create a book page in the user guide and let you reposition it?

where's that cookie Eye-wink

Posts: 116
Joined: 08/08/2007
Brain Stormer

Forget it, i figured it out.. It is done and placed here:

http://www.ubercart.org/docs/user/539/configuring_paypal_web_payments_st...

FYI, for documentation purposes, it would really help if you enabled h1,2,3 tags i your node body's! it's harder to make the instruction sections readable with underlines and asterisks

Also what about teh old quote tag?

i thought this site used to have that (i don't see it listed in the tags below)

Posts: 62
Joined: 08/31/2007
Bug Finder

Hi druru

Sad to say this,
But even after following your guide IPN is not succeeding.
If i left Paypal IPN url blank, No IPN information is transmitted.
If enter the IPN url you post some time back it shows IPN attempted with invalid order id.

Did you wrote the guide after succeeding with IPN?

Posts: 5269
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

I don't think he'd tried yet. Is this the site that isn't using clean URLs? And is it up on a live server for testing?

Posts: 116
Joined: 08/08/2007
Brain Stormer


Sad to say this,
But even after following your guide IPN is not succeeding.
If i left Paypal IPN url blank, No IPN information is transmitted.
If enter the IPN url you post some time back it shows IPN attempted with invalid order id.


Did you wrote the guide after succeeding with IPN?

i humbly must admit i did NOT actually perform a full checkout. i tested completely only up to the point where i get to the PP and the correct form is presented. I imagine if i got this far, there shouldn't be any PP errors since you're on their site and using their forms which have been bomb proof for some time. The IPN as handled by UC is an entirely different matter.

Errors happening now are probably going to be related to IPN and how UC modules handle it or a local config on your site/server. I say that because the way ryan setup PP WPS, it hands off the IPN automatically to PP and the module is soley responsible for processing the IPN return.

i also did not test with the sandbox either. Although very useful, that just seemed like a whole can of worms i wasn't ready to spend (waste) another day trying to figure out.

That said, i've taken all the info i had to spend a good day or two on finding by trial and error, posting, etc. And i think 95% of it is correct and rather thorough.

I would do a 'bzr update' to get the latest code before you do anything else. If that doesn't fix it, I would get with ryan and debug with him. I'm sure this process will get vetted out quite quickly as more use the PP WPS module. I think ryan put it out but there hasn't been a lot of in the field useage yet.

Finally, since the majority of that config document is done, i highly encourage you to update it if you find any "gotchas" or "setup tips" so that others can learn from your experience. Let's keep the info all in one place in the user's guide instead of spread out in forum posts.

Posts: 109
Joined: 08/08/2007
Getting busy with the Ubercode.Internationalizationizer

not really sure where to put this information. i feel it could be helpful to someone, and might even be easily fixed in the next update of the paypal module, so i'll put it here in case anyone is interested:

i encountered the following error after submitting my test order and landing on paypal:

"Unable to process payment. Please contact the merchant as the shipping address provided by the merchant is invalid, and the merchant has requested that your order must be shipped to that address."

a solution is posted on the paypal developer forums here:
https://www.paypaldeveloper.com/pdn/board/message?board.id=ipn&message.i...

the discussion on the forums suggests that there is a pesky variable (address_override) being passed which is unnecessary for sites where the merchant address is outside of the US. i found the variable in uc_paypal.module, have commented it out, and so far so good.

hope this info is of help!

Posts: 116
Joined: 08/08/2007
Brain Stormer

i'm not sure that's a bug. I got those same messages when testing my account but it actually was a feature. it seems (at least for US based customers) that PP tries to see if the address is valid. If not it won't process the order. this helps against credit card default.

you probably DO need to do that to allow addresses overseas but when you do it, you're eliminating an extra security precaution on your site.

fyi, i didn't know that feature was actually set in the UC code. I thought that was the default PP behavior so thanks for sharing it. Smiling

Posts: 5269
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Yeah, I include address_override info so that the shipping and billing addresses the customer has already entered get passed on to PayPal. It pre-populates certain forms so customers (ideally) don't have to enter data twice. Sometimes it doesn't work so well, though. Eye-wink

Posts: 15
Joined: 09/14/2007

i guess there are two options for this:

• modify the module (i am not a 'developer' yet, so can't assist sorry) so thee address_override variable is only sent for US address
• wait for paypal to improve its internationalisation.

I do not think we can really wait for the second...

any suggestions?

Posts: 5269
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

I'm about to adjust a couple things in the PayPal module and will allow store owners to turn address overriding on/off. That should be easier than your two options in the meantime. Eye-wink

EDIT: Added this in... will be in the PayPal WPS settings fieldset on the payment method form. You'll have to get it from the development repository.

Posts: 18
Joined: 09/26/2007

hi guys...
i have a question for you....
Paypal Website Payments Pro is only for USA ?
Or i can activate it for my italian store?

Sincerly,
Max