Skip to content

Conversation

@deov31
Copy link
Contributor

@deov31 deov31 commented Apr 20, 2020

INT-2118
INT-2188

What?

  • I added new component to handle a new version of amazon pay in the checkout. I also modified the behavior of this new amazonpay so it renders a static hosted widget where only shows a payment descriptor sent by amazon and a disconnect link.

Captura de pantalla 2020-05-08 a la(s) 14 57 35

  • I modified the Shipping component due to a requirement of Amazon. When a merchant is using amazonv2 (amazonpay) a billing address might be sent from amazon depending on if the merchant account is whitelisted. So in that case we need to show that billing address in the billing step instead of the shipping address. On the other hand, if no billing address is sent, we will show the same static message used for amazonv1 in the billing step.

Captura de pantalla 2020-04-24 a la(s) 17 53 18



Captura de pantalla 2020-05-08 a la(s) 14 58 59

  • I added a new component called StaticAddressEditable to handle a needed behavior in amazonv2. There's a scenario where the address selected in amazon page when starting checkout process might not be valid, so after returning to the checkout page and showing the static address there's no way to change it but only editing shopping cart. To solve that we added a new Edit Button to handle that change. In the PR #866 we added a new shipping strategy to bind the new button with the ChangeAction in Amazon and be able to edit the shipping address on amazon end.

Captura de pantalla 2020-05-08 a la(s) 15 04 39

Why?

Per requeriment of this new amazonpay version it has to show static addresses on bigcommerce side because that step is made in an amazon page.

Testing / Proof

INT-2118-New 2020-05-08 14_55_30

Demos Links

https://drive.google.com/open?id=1vOGKZCzkVa981zwpn4HbpjJ0ydXKhmi7

THIS PR DEPENDS ON ANOTHER PR IN CHECKOUT-SDK-JS #866

@bigcommerce/checkout @bigcommerce/apex-integrations

Copy link
Contributor

@clopezh clopezh left a comment

Choose a reason for hiding this comment

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

Hey @deov31 I have some comments for you, Could you please take a look and if you have any question please let me know. Also please fix the tests that are failing in circle ci 🔴 ♻️

@deov31
Copy link
Contributor Author

deov31 commented Apr 22, 2020

Hi @clopezh, thanks for your comments. Can you please take a look again? Also, build continue failing due a missing field in CustomerInitializeOptions and PaymentInitializeOptions in checkout sdk side, tests are passing. ♻️

Copy link
Contributor

@clopezh clopezh left a comment

Choose a reason for hiding this comment

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

LGTM :+1

@ghost
Copy link

ghost commented Apr 24, 2020

💚 Tested

QA Details:

  • Test suite to verify payment option for amazon works correctly

@vmparra vmparra added sydney and removed mexico labels Apr 24, 2020
@cbandam cbandam added mexico and removed sydney labels Apr 24, 2020
Copy link
Contributor

@clopezh clopezh left a comment

Choose a reason for hiding this comment

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

@deov31 Hello Fanny! I only have one comment, Could you please take a look?

@deov31
Copy link
Contributor Author

deov31 commented May 12, 2020

Hi @clopezh I addressed your new comment. Can you please take a look again? ♻️ Thanks for the review.

Copy link
Contributor

@clopezh clopezh left a comment

Choose a reason for hiding this comment

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

All looks good! Thank you for addressing my requests 👍

@lpschz
Copy link
Contributor

lpschz commented May 27, 2020

@deov31 could you please take a look at the build errors? thanks!

@deov31
Copy link
Contributor Author

deov31 commented May 27, 2020

Hi @capsula4 the build error is caused due to the missing types on the current version of sdk on master. We created a new PR in sdk code but it points to a feature branch called amazon_maxo. I think we have two ways to fix this:

  1. Adding the amazon_maxo feature branch version in package.json to retrieve needed dependencies to fix the build, but we cannot merge this until the sdk code is merged as I mentioned in the description due to the dependency. Also, if this was possible, after merging the feature branch version into master I will change again the version in the package.json

  2. Is there any way I can point to a specific version of checkout-sdk on the circle CI build job? Or any env variable I could change in the circle CI configuration?

The build error is

ERROR in /home/circleci/repo/src/app/payment/paymentMethod/AmazonPayV2PaymentMethod.tsx(35,9):
   TS2345: Argument of type '{ amazonpay: { container: string; }; amazon?: AmazonPayCustomerInitializeOptions | undefined; braintreevisacheckout?: BraintreeVisaCheckoutCustomerInitializeOptions | undefined; ... 8 more ...; params?: {} | undefined; }' is not assignable to parameter of type 'CustomerInitializeOptions'.
     Object literal may only specify known properties, and 'amazonpay' does not exist in type 'CustomerInitializeOptions'

If you have any observation or recommendation, please let me know.

@deov31
Copy link
Contributor Author

deov31 commented May 29, 2020

Hi @capsula4, thanks for the review. I addressed your comments, can you please take a look again? ♻️

Copy link
Contributor

@lpschz lpschz left a comment

Choose a reason for hiding this comment

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

Thanks for addressing the feedback! Looking better! Just one outstanding question around syncing the billing address to the API with the same information that the API actually returned.

@deov31
Copy link
Contributor Author

deov31 commented Jun 2, 2020

Thanks again for the new comments @capsula4. I updated the PR based on your feedback. Can you please take a look again? ♻️

@mauricio-sg
Copy link
Contributor

Hi @capsula4, I also made some changes to this PR because of the dependency with SDK, let us know any question you could have. Thanks!

@deov31
Copy link
Contributor Author

deov31 commented Jun 3, 2020

Hi @capsula4 I addressed your latest suggestions. Can you review again? ♻️

@ghost
Copy link

ghost commented Jun 4, 2020

💚 Tested

QA Details: Re-testing to validate changes from comments in PR. A couple of test cases where added.

  • Test suite to verify payment option for amazon works correctly

@rodna-bc rodna-bc added the on hold This can't be merged yet. It has some external dependency. label Jun 4, 2020
@mauricio-sg
Copy link
Contributor

@deov31 @rodna-bc @capsula4 I had to do one more commit because of the last suggested changes on SDK. With this change, CircleCI will not pass because of the new isShippingStepPending selector.

Estefania Ocampo and others added 2 commits June 23, 2020 11:14
- Render Amazon Pay as a HostedWidgetPaymentMethod
- Introduces a new StaticAddressEditable component
- Uses the new isShippingStepPending selector
@rodna-bc rodna-bc added ready to merge Pull request that have been approved and are waiting to be merged and removed on hold This can't be merged yet. It has some external dependency. labels Jun 23, 2020
@PascalZajac PascalZajac merged commit 5ddb1b3 into bigcommerce:master Jun 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integrations ready to merge Pull request that have been approved and are waiting to be merged reviewed sydney

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants