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

feat(next): paypal createOrder and onApprove hooks #17837

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

StaberindeZA
Copy link
Contributor

Because

  • Submit PayPal checkout to payments-next

This pull request

  • Add logic to PayPal button createOrder and onApprove hooks.

Issue that this pull request solves

Closes: #FXA-7586

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).

Screenshots (Optional)

Please attach the screenshots of the changes made in case of change in user interface.

Other information (Optional)

Any other information that is important to this pull request.

@StaberindeZA StaberindeZA requested a review from a team as a code owner October 16, 2024 15:44
@@ -114,9 +114,11 @@ export class NextJSActionsService {
async checkoutCartWithPaypal(args: CheckoutCartWithPaypalActionArgs) {
await new Validator().validateOrReject(args);

await this.cartService.checkoutCartWithPaypal(
await this.cartService.setCartProcessing(args.cartId);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

What about updating the cart to processing here as part of the nextjs-action service?

Copy link
Member

Choose a reason for hiding this comment

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

I'd like the checkoutCartWithPaypal method to be responsible for these state changes. checkoutCartWithPaypal should throw an error if called on a cart in the processing state.

@StaberindeZA StaberindeZA force-pushed the fxa-7586-paypal-initial-hooks branch 2 times, most recently from 67bd7ca to 66c3304 Compare October 16, 2024 20:21
Because:

- Submit PayPal checkout to payments-next

This commit:

- Add logic to PayPal button createOrder and onApprove hooks.

Closes #FXA-7586
@StaberindeZA StaberindeZA merged commit c2479c6 into main Oct 17, 2024
24 of 25 checks passed
@StaberindeZA StaberindeZA deleted the fxa-7586-paypal-initial-hooks branch October 17, 2024 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants