Skip to content

Commit d4f4fc5

Browse files
authored
Add 'commit' option to PayPalOneTimePaymentSessionOptions type (#827)
1 parent 00069d9 commit d4f4fc5

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

.changeset/bright-shrimps-drop.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@paypal/paypal-js": patch
3+
---
4+
5+
add 'commit' option to PayPalOneTimePaymentSessionOptions type

packages/paypal-js/types/v6/components/paypal-payments.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ export type OnCancelDataSavePayments = {
7979
};
8080

8181
export type PayPalOneTimePaymentSessionOptions = BasePaymentSessionOptions & {
82+
commit?: boolean;
8283
orderId?: string;
8384
onApprove?: (data: OnApproveDataOneTimePayments) => Promise<void>;
8485
onShippingAddressChange?: (

packages/paypal-js/types/v6/tests/paypal-payments.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ async function main() {
5959
const paypalPaymentSession = sdkInstance.createPayPalOneTimePaymentSession({
6060
onApprove: onApproveCallback,
6161
onCancel: onCancelCallback,
62+
commit: true,
6263
});
6364

6465
const createOrder = () => Promise.resolve({ orderId: "ABC123" });

0 commit comments

Comments
 (0)