-
Notifications
You must be signed in to change notification settings - Fork 78
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 - JSv4 #997
Comments
We need to follow the guide above to upgrade our Express Checkout integration to their JSv4 integration using their checkout.js script. Our API calls and everything should still work the same way, so this should just be a matter of updating how our buttons are displayed and how they trigger the API calls. This should not require an entire re-write of the integration. |
This may replace the need for the "In Context" functionality. This JSv4 integration happens on your site similar to In Context by default, so I believe we'll be able to get rid of the In Context stuff and replace it with JSv4. |
I believe we'll also be able to remove our option to add the PayPal Credit button because that gets tied into this JSv4 experience as well. so where we currently have both EC and PayPal Credit buttons displayed (depending on settings) we'll just have this one "smart button" now. Still need to verify 100% but I believe this is the case... |
Or it might be that we still need to provide our options, and then that will help us dynamically build the JavaScript to generate the "smart buttons" on the site. I believe we'll have the ability to include PayPal EC, Credit, Venmo, Apple Pay, Android Pay, Credit Cards, all in a single button integration with options. |
Yeah, the Upgrade doc has links within it for "customize the button" and this shows how to present all the different options. So we'll still need our settings, I think, and then based on the user settings we'll build the JSv4 button accordingly. Hopefully this will help with our general button alignment issues we've had in some themes. Now we'll just have a single button instead of trying to line up EC and Credit buttons side by side. We will need to consider that if they enable lots of options there will be lots of buttons stacked on top of each other. |
Quick example from a PayPal rep:
Demo: https://developer.paypal.com/demo/checkout/#/pattern/responsive |
Need to update documentation to show that "In Context" is now called "Smart Buttons" and provide info on building your button display using the options in the Smart Buttons section of EC settings. |
@iMansoorAliKhan Could you please test this issue for me? |
@kcppdevelopers Sure, I'm just going to test it now. will give my feedback here. |
Please see my findings
|
@kcppdevelopers Okay, yeah, that's fine. So the basic logic would be something like...
Is that what you did in these recent commits? |
@kcppdevelopers Testing on latest updates, I added ELV and Credit to the "hide" option under smart buttons. It's correctly adding those to the disallowed section, and the result on the front end is as expected. However, it's still leaving those options under "allowed" too..??
|
Per discussion with @kcppdevelopers, Venmo returns an error that it cannot be disallowed when specifically added to the disallow parameter. As such, if Venmo is added to the "hide" option under smart button settings then we'll simply leave it out entirely...so it won't be added to allowed or disallowed. The other options can be specifically added to allowed or disallowed based on whether or not they are hidden in settings. |
@angelleye I have applied changes as per discussion and push to dev branch. |
@kcppdevelopers This looks better, thanks. I will talk to PayPal about why Venmo doesn't show up even on their own demo. |
@kcppdevelopers In the Smart Button settings, if I have it set to Horizontal layout I get additional options like Button Label. Right now, though, if I hide PayPal Credit in the hide option, I can still set Button Label to Credit so it just shows a PayPal Credit button. This is confusing. We need to make sure the PayPal Credit option doesn't show up in the Label option if it has been added to the hide option already. Also, I notice that you have "Paypal" in some of these settings/options. We need to make sure to always use "PayPal". @iMansoorAliKhan says this was already fixed but now it's happening again..?? |
@kcppdevelopers Also, PayPal Credit is showing up now regardless of the country set on the site..?? PayPal Credit is only available in the US and UK, so if the country is not set to one of those we need to remove PayPal Credit from the options entirely. |
@kcppdevelopers in Firefox smart button ( vertical ) is taking 2 clicks to open popup. |
@iMansoorAliKhan I have checked smart button ( vertical ) it is working well in the single click. I have also checked in your website and for me it's working.. |
@kcppdevelopers When viewing source on a cart page I see this:
Notice that you're passing the API username into the I'm pretty sure that's what should go in the You actually have this included on the page(s) where the buttons are initially being displayed, but the Smart Button docs only talk about using it at the DoExpressCheckoutPayment step within the checkout flow, which makes sense because we don't get that value back until we've already made the call to SetExpressCheckout and the user has logged in and returned back to the site. So I'm not sure why we're including |
@angelleye Actually client/payer_id optional parameter and it's not required in our custom integration so I have remove completely. I have double checked and it's working fine. |
https://developer.paypal.com/docs/integration/direct/express-checkout/integration-jsv4/upgrade-integration/
The text was updated successfully, but these errors were encountered: