bigcommerce / checkout-sdk-js

BigCommerce Checkout JavaScript SDK
MIT License
132 stars 215 forks source link

refactor(payment): PAYPAL-4578 updated ApplePay strategies with BraintreeSdk #2612

Closed serhii-tkachenko closed 3 weeks ago

serhii-tkachenko commented 1 month ago

What?

Updated apple pay strategies with BraintreeSdk class instead of BraintreeIntegrationService

Why?

BraintreeIntegrationService is deprecated, so to be able to remove it in the future apple pay strategies should be updated

Testing / Proof

Manual tests:

Unit tests CI

animesh1987 commented 3 weeks ago

I feel we need to refactor these strategies separately to braintree ones, since with this approach we will have to pass braintree sdk everytime. Maybe its better to have a separate strategy.

serhii-tkachenko commented 3 weeks ago

I feel we need to refactor these strategies separately to braintree ones, since with this approach we will have to pass braintree sdk everytime. Maybe its better to have a separate strategy.

IMO In terms of maintenance its better to pass 1 extra class instead of creating separate strategies. I don't think it affects overall apple pay performance for other apple pay gateways... so it we might think about it when we have to inject some specific to other provider code