Skip to content

Commit 39b5b06

Browse files
update react-paypal-js and apply new subscription type (#185)
1 parent 6ca468d commit 39b5b06

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

client/prebuiltPages/react/package-lock.json

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/prebuiltPages/react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"typecheck": "tsc --build --noEmit"
1414
},
1515
"dependencies": {
16-
"@paypal/react-paypal-js": "^9.0.0",
16+
"@paypal/react-paypal-js": "^9.0.1",
1717
"react": "19.2.4",
1818
"react-dom": "19.2.4",
1919
"react-error-boundary": "6.1.0",

client/prebuiltPages/react/src/paymentFlowCheckoutPages/SubscriptionCheckout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ import {
44
usePayPal,
55
useEligibleMethods,
66
INSTANCE_LOADING_STATE,
7-
type OnApproveDataOneTimePayments,
87
type OnCompleteData,
98
type OnCancelDataOneTimePayments,
109
type OnErrorData,
1110
PayPalSubscriptionButton,
11+
OnApproveDataSubscriptionsPayments,
1212
} from "@paypal/react-paypal-js/sdk-v6";
1313
import BaseCheckout from "../pages/BaseCheckout";
1414
import type { ModalType, ModalContent } from "../types";
@@ -35,7 +35,7 @@ const Checkout = () => {
3535
const isLoading = loadingStatus === INSTANCE_LOADING_STATE.PENDING;
3636

3737
const handleSubscriptionCallbacks = {
38-
onApprove: async (data: OnApproveDataOneTimePayments) => {
38+
onApprove: async (data: OnApproveDataSubscriptionsPayments) => {
3939
console.log("Subscription approved:", data);
4040
console.log("Payer ID:", data.payerId);
4141
setModalState("success");

0 commit comments

Comments
 (0)