osCommerce / oscommerce2

osCommerce Online Merchant v2.x
http://www.oscommerce.com
MIT License
281 stars 221 forks source link

Store_Name and Page_Style not working in PayPal app Version: 4.039 (Standard only) #404

Closed bigtsauce closed 7 years ago

bigtsauce commented 7 years ago

Using Pay Pal payments standard with the PayPal App, the page style and store name are not passed along to Pay Pal. The default business name on the Pay Pal account is shown instead. The same style profile does work with Pay Pal express in the same app, so it is not a fault with the profile.

I have tested it on two different stores (both BS Gold versions of oscommerce), I have tested it with all lowercase letters in the profile name, it still does not display the store name or pay pal page style that it should.

Note: Unfortunately it's not a simple case of just getting another Pay Pal business account because accounts with no history can be subject to 30-day money holds and other issues. I am pursuing Pay Pal standard because the flow of express checkout has proven confusing for many customers and wherever PP express is used (including eBay), it has a habit of absolutely butchering buyer's addresses (or passing back an address they didn't intend to use) - we'd rather have it all handled on site with payments standard.

bigtsauce commented 7 years ago

I have a response from Pay Pal tech support after running some tests..

I acknowledge that this is a bug.

During the request, the value passed is ProfleName which should show this image (https://www.xxxxxxxx.com.au/images/storelogopp2.png) but unfortunately it just showing only"Business Name ".

I am now creating an Internal ticket to get this issue fix by the developer.

However, can you change the page_style to page_style_name? the correct parameter is page_style_name for WPS button.

The odd thing is, the docs I've seen say page_style is the correct parameter - if he is correct and it's page_style_name, the code in the Pay Pal app may need to be changed.

bigtsauce commented 7 years ago

page_style

I stand corrected, this is from: https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/

It appears it should be page_style_name - how can this be changed in the PayPal App for oscommerce?

haraldpdl commented 7 years ago

I'm not sure changing the parameter name to page_style_name will fix it for you - I understand that the name of the page style should be passed in the page_style parameter.

If you'd like to play around with this, check on line 393 on the following file:

catalog/includes/modules/payment/paypal_standard.php

Thanks for looking into this!

bigtsauce commented 7 years ago

Gday Harald, I've heard Pay Pal assigns an entry level tech to answer questions in the beginning, that is why I was unsure of his answer to be honest. Until they have a developer look at the bug (their words), perhaps we should see what happens when they fix the issue at their end.

The other issue is, the store_name is not passing to Pay Pal at all with the Payments Standard part of the app, it defaults to the business name on the PP account. It works perfectly for express, but not in standard at all.

haraldpdl commented 7 years ago

I just added a page style to our online demonstration and it's working there without any code modifications. Try it out:

https://demo.oscommerce.com

You will need to select the following payment method during the checkout procedure:

PayPal (including Credit and Debit Cards) (paypal_standard; Sandbox)

In the PayPal Page Style settings page, I added the osCommerce logo as a page header. Adding it as a logo didn't show.

bigtsauce commented 7 years ago

When I put through a test order on there, this was the URL:

https://www.sandbox.paypal.com/au/cgi-bin/webscr?cmd=_flow&SESSION=x_4kNvz2mOXE3HBrpNgGAw82OXW1O08bloddRwkCa3uPS7PwSppYl6J5ys4&dispatch=50a222a57771920b6a3d7b606239e4d529b525e0b7e69bf0224adecfb0124e9b61f737ba21b08198308e6972871271d6300043af4fab8efe

When I put through a test order on one of my sites earlier, this is how it looked:

https://www.paypal.com/webapps/hermes?token=93B42238M71323323&useraction=commit&rm=2&xclick_params=bG9naW5fZW1haWwlM0RzYWxlcyUyNTQwYXVzdHJhbGlhbi1uYXRpdmUuY29tLmF1JTI2dGhpcmRfcGFydHlfY2FydF9uYW1lJTNEd3d3LnQtc2hpcnRzYXVjZS5jb20uYXUlMjZ1cGxvYWQlM0QxJTI2aXRlbV9uYW1lXzElM0RQdWclMjUyMEZhY2UlMjUyMENoaWxkcmVucyUyNTIwVC1TaGlydCUyNnNoaXBwaW5nXzElM0Q1LjUwJTI2YnVzaW5lc3MlM0RzYWxlcyUyNTQwYXVzdHJhbGlhbi1uYXRpdmUuY29tLmF1JTI2YW1vdW50XzElM0QyMi4wMCUyNmN1cnJlbmN5X2NvZGUlM0RBVUQlMjZpbnZvaWNlJTNEMTUwMTE3JTI2Y3VzdG9tJTNEMyUyNm5vX25vdGUlM0QxJTI2bm90aWZ5X3VybCUzRGh0dHBzJTI1M2ElMkYlMkZ3d3cudC1zaGlydHNhdWNlLmNvbS5hdSUyRmV4dCUyRm1vZHVsZXMlMkZwYXltZW50JTJGcGF5cGFsJTJGc3RhbmRhcmRfaXBuLnBocCUyNnJtJTNEMiUyNnJldHVybiUzRGh0dHBzJTI1M2ElMkYlMkZ3d3cudC1zaGlydHNhdWNlLmNvbS5hdSUyRmNoZWN

(I trimmed some of the URL, but you get the idea).

haraldpdl commented 7 years ago

The different urls may be due to different PayPal seller account settings, regardless the page style should show.

There is also no store_name parameter defined for Payments Standard. The closest ist "cbt" which is shown on the PayPal payment completion page with the link returning the customer back to the store. This is used in the module but is only used if the total string length is no more than 60 characters long (as described on the Payments Standard technical integration guide).

bigtsauce commented 7 years ago

Yes sorry, that is what I am referring to. The cancel and return to (store name) link defaults to the business name under our Pay Pal account instead of using the store name like the express module does.

As for the page style, we will see if their bug fix makes it function properly when they put a developer onto it, if not I'll see if changing to page_style_name does anything.

haraldpdl commented 7 years ago

Changing the parameter name to "page_style_name" will more than likely not work. "page_style" is the correct parameter name.

You could try setting your desired page style as Primary, and entering "primary" as the page style name in the osCommerce module configuration settings.

It's also possible to preview the page style in your PayPal account settings - is it showing correctly here?

bigtsauce commented 7 years ago

Yes it is showing correctly there and works perfectly with Pay Pal express, so it is a working profile, just not with Payments Standard. The store name also passes along perfectly with express checkout (if only the buyer addresses etc passed back to sites as well! haha).

If I cannot find a solution that will allow each of my sites to show customised payment pages, I may have to come up with some kind of joint banner/logo design that makes it clear name A is our business name but sites B and C are also our stores. I'll set that to Primary and hopefully it will show by default. I would really have preferred to keep them somewhat separate with their own logos and identities though.

haraldpdl commented 7 years ago

What would help PayPal greatly is if you could forward them the parameters being passed on the checkout confirmation page. If you view the HTML Source on that page from your browser, you should see a bunch of hidden input parameters next to the checkout button, something like:

<input type="hidden" name="cmd" value="_cart" />
<input type="hidden" name="upload" value="1" />
<input type="hidden" name="item_name_1" value="A Bug's Life" />
<input type="hidden" name="shipping_1" value="5.00" />
<input type="hidden" name="page_style" value="demo_23" />

They'll then be able to see why it's not working for you.

bigtsauce commented 7 years ago

They actually did that right away from their end. I set up Payments Standard on our least busy store (it's quite new) and let them run some tests - they did show me a screen capture of the code and showed the page_style etc - that's when they admitted that part being a bug. I will of course keep the support thread going until this is all sorted out.

bigtsauce commented 7 years ago

Harald, I wanted to ask you about PayPal express checkout - part of the reason I no longer want to use it and need Pay Pal Standard fully functional is how erratic it is - I would prefer the customer enter their details on site and make sure we get the addresses correctly (especially in my store where often people send gifts to others). Have you heard from others complaints about the information it passes back to stores?

Just tonight, I had an order come through one of my new oscommerce sites, the order process email had no name entry at all, just an address under delivery and also under billing without the name slot altogether. On the site, the name does appear under customer and a partial name appears under the billing and ship to addresses (it was like R.W. Surname, but it cut the R off). This has happened about 3% of the time so far.

In other cases, I've had it have an entirely different ship to address than the customer swears they entered - it's happened too many times to be the customer picking the incorrect address. Also on one of our test transactions, a seller friend of mine selected her personal address for delivery, but when it went through her name was missing from the order process email and it put her business address in the ship to area rather than the personal one she picked. This is a seller with websites of her own that she works on herself, it is highly unlikely to have been buyer error.

I've had the words "Please Select" passed across as the business name of a customer who did not have a business name at all, the Please Select is from the address drop-down menu on Pay Pal. I've also had a few other random entries in the business name slot (it's not a required slot on our website).

The reason (despite my lack of knowledge of code) I think it has nothing to do with oscommerce and everything to do with Pay Pal express checkout is, I've also had erratic addresses on a Bigcommerce site when express checkout is used and on eBay FREQUENTLY. I've also never had any of this happen with alternative payment methods. Additionally, the way the checkout flow works I've also had multiple buyers across 3 sites think they placed an order when they didn't because they fail to press the final confirm order button and make a payment after they return from Pay Pal to the website, I added some words to the confirmation page to make it more obvious it needs to be pressed in the meantime.

I am admin of an eBay seller FB group, so I hear about mistakes in buyer addresses on a regular basis. The most frequent one is the suburb is missing altogether and the capital city is shown instead (causing order delays, a big no-no on eBay). I've personally had numbers added to the first name of the customer like 07Wayne or their postcode/email address is added into their name etc. There is also the situation where Apartment numbers are left off entirely, ending in parcels being returned to sender.

What I don't understand is, with Pay Pal specifically pushing people to use Express Checkout (they phoned me to talk me into using it last year even), why on earth don't they do something about the tech issues with it? They want to be the world's payment method, but this stuff has been ongoing for a long time now and I don't see it ending anytime soon.

At a grass roots level, this is causing real problems with transactions worldwide and can result in packages being undelivered, bad feedback on eBay and all sorts of issues between buyers and sellers. Buyers blame sellers, sellers blame buyers for entering a bad address but it tends not to be either of those at fault, it's Pay Pal express checkout! Sorry for the lengthy rant, the frustration has been building with this payment method for a while.

haraldpdl commented 7 years ago

It would be great if you could perform test transactions on our demo site and see if you can reproduce it there. That would help us immensely in finding out if a problem exists in the payment modules.

The scenario to test is using EC on the shopping cart page and selecting a different shipping address in the EC flow.

For already logged in customers, their default shipping address should be passed to PayPal. For guests who have not logged in locally in the online store, their default PayPal shipping address should be used when they return back to the online store.

If a guest authenticates themselves at PayPal, either a new customer account is created locally with their PayPal email address, or if their e-mail address already exists, they are automatically logged into their local account (they already authenticated themselves at PayPal so this is secure).

Regardless of scenario, if the customer is logged on locally, their default shipping address should be used, otherwise their PayPal shipping address is used.

haraldpdl commented 7 years ago

Customers also have the possibility to change their shipping address on the checkout confirmation page, however whatever is ultimately shown on the checkout confirmation page is what is stored and shown on the Admin -> Orders page.

bigtsauce commented 7 years ago

In my tests on my own site, I picked a delivery address from a drop-down on the Pay Pal site and then I came back to my site to press the final Confirm Order button (and actually make the payment). The one sad thing is about online selling is, customers tend to read very little when placing orders, so if there is a bug in the address, they may not notice it.

I will see what I can do with the demo site and testing. It is October however, the Christmas sales quarter, (AKA our one big chance to actually sell a decent amount of goods all year) and I have a mountain of work to do as I'm still not Christmas ready, especially with two newish sites).

haraldpdl commented 7 years ago

Did your PayPal shipping address show correctly for the order on the checkout confirmation page and the Admin -> Orders page?

What outcome would you like to have? Should it not be allowed to select a shipping address at PayPal during EC, or would you perhaps prefer to have the customer return to the checkout shipping page instead of the checkout confirmation page?

bigtsauce commented 7 years ago

In my personal test orders, the addresses have come through fine but it almost seems like a pot-luck situation. Some orders are always fine, then others are randomly messed up in one way or another.

I would prefer the customer choose all addresses on my website and only move to Pay Pal for payment, that's why I've been trying to get standard working (I also had to get modifications to have QTPro take quantities off correctly as I sell clothing).

The flow of Pay Pal express checkout seems to be unnatural for buyers - returning to the site from Pay Pal should be all they need to do (like with standard how you pay at Pay Pal, then return to a success page with the order already confirmed). I've found with Express checkout customers were returning to the site and simply either logging off or closing the browser, no payment, no order. I've even had a couple phone up and ask about the whereabouts of their order (that they never placed).

Things need to be as simple as humanly possible, looking at it from a retail customer point of view, I think Pay Pal should have tried more to empathise with your basic internet user that has pretty much no technical knowledge at all (and doesn't read much of anything when it comes to instructions), because they do make up a significant percentage of online shoppers and if you make it dead simple for them, then it will work for everyone.

bigtsauce commented 7 years ago

Bad news for Pay Pal Standard - direct quote:

This is the update that we get from the development team ;

Custom styles are deprecated in functionality. Hermes deprecated support for this a long time ago (last year) and will not be supporting it going forward.

Apologies for any inconvenience caused.

haraldpdl commented 7 years ago

Thanks for forwarding that to us.

If you'd like to use EC just for payment, what do you think of the following flow:

Shopping Cart -> EC -> Checkout Shipping -> Checkout Confirmation

Logged in local customers would have their standard shipping address set, and guests would have their PayPal shipping address selected by default.

We did previously finalize the order when the customer returned from EC back to the store - we checked if the order totals matched with regards to cart items, shipping, and taxes, and if the totals matched, the order would be processed skipping the checkout confirmation page.

There is no way though to determine that up-front. It is possible to change the final EC button from "Continue" to "Pay Now" however:

1) if "Pay Now" is shown and the order totals did not match, the customer would be shown the checkout confirmation page which they might not finalize, 2) if "Continue" is shown and the order totals match and the order is finalized, it could scare the customer as to why their order was suddenly processed and this also introduces legal issues (some countries must show a "Pay Now" button with intent for purchasing the order).

haraldpdl commented 7 years ago

BTW, which EC checkout flow are you using? There is the standard full page checkout flow, and a popup checkout flow called In-Context.

Our demo site uses In-Context - have you already seen this?

bigtsauce commented 7 years ago

I do think the button changing to Pay Now from Confirm Order would be better (it's Confirm Order in my version) if the flow remains with the customer returning to the site AFTER they visit Pay Pal. This flow suggestion Shopping Cart -> EC -> Checkout Shipping -> Checkout Confirmation would be better. When the order has more than 2 or 3 items on it, the Pay Now button can be below the fold of the page, I think having a Pay Now button at the top of the order (perhaps on both ends) also may be more obvious to the customer.

I am not using the popup checkout flow (i'm actually unaware of that). My main issue is solving the bad addresses so your suggested flow should help that.

bigtsauce commented 7 years ago

Gday Harald - in your opinion, are any of the other solutions in the Pay Pal app suitable? I have never used PP Payments Pro (hosted or otherwise), would either of those solve the address and customisation issues? I am not familiar with how they work. We effectively will have 3 totally different named/themed stores running out of one Pay Pal account.

I guess the other question is, would we have the same stock issue with either of those as with PP Payments Standard (where the attribute quantity is not deducted but the total number of stock changes after a sale)?

haraldpdl commented 7 years ago

Check out the In-Context checkout flow on our demo site. Add a product to your shopping cart and use the yellow Check out with PayPal button. This will use the PayPal shipping address for guests and the stores shipping address for logged in customers.

https://demo.oscommerce.com

This can be enabled in the PayPal App by adding the following empty file to the following directory:

catalog/includes/apps/paypal/with_beta.txt

as soon as that file exists, a new Checkout Flow configuration parameter will appear in your PayPal App Express Checkout configuration page.

As this isn't a bug with the App, the issue will be closed. If you can provide a step-by-step list of instructions on how to reproduce the problem, please open a new issue and we'll look into it.

Thanks!