Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Express Checkout - Checkout Page Address(es) #215

Closed
angelleye opened this issue Jun 12, 2015 · 9 comments
Closed

Express Checkout - Checkout Page Address(es) #215

angelleye opened this issue Jun 12, 2015 · 9 comments
Assignees
Milestone

Comments

@angelleye
Copy link
Collaborator

Currently, I do not think we are using the ADDRESSOVERRIDE parameter in SetExpressCheckout at all.

This is only necessary if the user checks out through the WooCommerce checkout page instead of using an EC button from the cart page or product page.

When checking out from the WC checkout page the user is typing in their billing and shipping address. As such, we need to include this shipping address in the PayPal SetExpressCheckout request along with the ADDRESSOVERRIDE set to 1/true so that the address used on the WC checkout page is carried out all the way through the rest of checkout and cannot be changed in the PayPal checkout pages.

@angelleye angelleye added this to the 1.1.6.4 milestone Jun 12, 2015
@angelleye
Copy link
Collaborator Author

Just remember that if people checkout through the cart page or product detail page then they haven't entered an address yet, so in that case we would not be sending an address in SEC to PayPal so would not need any override.

@angelleye
Copy link
Collaborator Author

One caveat, though, is that if the user is signed into the site or creates an account, they may have a shipping address available from that data. In this case, though, what we should do is send the address in the SEC request to PayPal, but WITHOUT the override.

This way it will fill in the address the site has on file for them, but if that address is wrong for any reason the user would still be able to change it to an address they have setup in their PayPal account.

@angelleye
Copy link
Collaborator Author

One more thing here. If the user checks out via the WC checkout page then we've already obtained the shipping address, calculated shipping/tax, etc. As such, we do not need to display the review page that typically shows up when the user is returned from PayPal.

Instead, we can treat it as if "skip final review" was enabled even if that option is not enabled. In this scenario it makes sense to go ahead and treat it that way.

The logic for handling such a checkout is already built in as long as "skip final review" is enabled, so we could probably just add a little bit of logic around that setting to make sure it gets enabled when the WC checkout page is used.

@jigneshkailam
Copy link
Contributor

I am done with this and push to issue #215 branch for your review.

@angelleye angelleye modified the milestones: 1.1.6.4, 1.1.6.5 Jun 23, 2015
@angelleye angelleye modified the milestones: 1.1.6.4, 1.2 Jul 1, 2015
@angelleye
Copy link
Collaborator Author

I am unable to get this merged due to a merge conflict. Please merge the current release branch into this branch and resolve the conflicts for me.

@angelleye
Copy link
Collaborator Author

Not sure if you're done yet, but I'm still getting a merge conflict when I try to merge this into the release branch.

@kcppdevelopers
Copy link
Contributor

I have resolved conflict and push issue-215-B branch into the release branch.

@angelleye
Copy link
Collaborator Author

I may have confused you with something I mentioned in a previous comment. Now, we have 2 separate params:

$SECFields['addroverride'] = 1;
$SECFields['addressoverride'] = 1;

We do not need both of those parameters. PayPal's SetExpressCheckout documentation shows that the correct parameter name is "addroverride", so that is the only one we need. We just need to make sure that it's getting used when we need it to, and is working correctly with the checkout when we test that scenario.

@kcppdevelopers
Copy link
Contributor

I have remove "addressoverride" parameter and push into the release branch.

@angelleye angelleye modified the milestones: 1.2, 1.1.7.6 Dec 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants