Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Update to New PayPal SDK #267

Merged
merged 1 commit into from
Oct 26, 2020
Merged

Conversation

seand7565
Copy link
Contributor

@seand7565 seand7565 commented Oct 14, 2020

This switches from the braintree SDK to the new PayPal SDK, which
allows for displaying credit messaging/buttons.

This update adds two new config options:

  • Layout, accepting either horizontal or vertical, changing
    the layout of the buttons
  • Messaging, a boolean, that controls whether the messaging
    component is loaded in.

This update also removes the size config option, as it no longer
does anything. PayPal uses the responsive size for everything now,
and expects you to resize your elements locally to whatever size
you want.

@seand7565 seand7565 marked this pull request as ready for review October 19, 2020 19:43
@kennyadsl
Copy link
Member

Needs a rebase now that I merged the Rubocop one, @seand7565 .

Copy link
Member

@kennyadsl kennyadsl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one thing: are some of these change breaking for who already uses the extensions? If yes we should either keep the old code working or release a major.

This switches from the braintree SDK to the new PayPal SDK, which
allows for displaying credit messaging/buttons.

This update adds two new config options:
* Layout, accepting either `horizontal` or `vertical`, changing
the layout of the buttons
* Messaging, a boolean, that controls whether the messaging
component is loaded in.
This update also removes the `size` config option, as it no longer
does anything. PayPal uses the responsive size for everything now,
and expects you to resize your elements locally to whatever size
you want.
@seand7565
Copy link
Contributor Author

Just one thing: are some of these change breaking for who already uses the extensions? If yes we should either keep the old code working or release a major.

I could see two cases where this would be considered breaking:
If you've overridden the PayPal button create to use your own methods, those methods will need to be updated from the old payment and on_authorize returns to the new createOrder/createBillingAgreement and onApprove methods

-and-

The size attribute no longer does anything for PayPal, meaning that some stores will have to do some CSS work to get it looking normal again. Come to think of it, the added messaging component might also mean looking at CSS again depending on the store.

The changes that make the above possible all come from updating to the new PayPal SDK, so keeping the old code around wouldn't help I think. IMO this change warrants a new release. WDYT?

@kennyadsl
Copy link
Member

I agree, and I'm seeing that we have no major for this extension. We can still do a minor bump to 0.5.0 hoping it's enough to indicate that there's something breaking.

@kennyadsl kennyadsl merged commit a85cddf into solidusio:master Oct 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants