-
Notifications
You must be signed in to change notification settings - Fork 210
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(next): paypal createOrder and onApprove hooks
Because: - Submit PayPal checkout to payments-next This commit: - Add logic to PayPal button createOrder and onApprove hooks. Closes #FXA-7586
- Loading branch information
1 parent
b575985
commit 10588e1
Showing
12 changed files
with
204 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { | ||
StripeCustomerFactory, | ||
StripePriceFactory, | ||
} from '@fxa/payments/stripe'; | ||
import { PrePayStepsResult } from './checkout.types'; | ||
import { ResultCartFactory } from './cart.factories'; | ||
import { faker } from '@faker-js/faker'; | ||
|
||
export const PrePayStepsResultFactory = ( | ||
override?: Partial<PrePayStepsResult> | ||
): PrePayStepsResult => { | ||
const cart = ResultCartFactory(); | ||
|
||
return { | ||
version: cart.version, | ||
uid: faker.string.uuid(), | ||
email: cart.email, | ||
customer: StripeCustomerFactory(), | ||
enableAutomaticTax: true, | ||
price: StripePriceFactory(), | ||
...override, | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.