Skip to content

Commit 2c9c4ce

Browse files
committed
Show all payment methods available
1 parent bc1bc5b commit 2c9c4ce

File tree

1 file changed

+18
-22
lines changed

1 file changed

+18
-22
lines changed

packages/react-components/src/components/payment_source/CheckoutComPayment.tsx

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -192,29 +192,25 @@ export function CheckoutComPayment({
192192
onError: (component, error) => {
193193
console.error("onError", { error }, "Component", component.type)
194194
},
195-
// onPaymentCompleted: async (component, paymentResponse) => {
196-
// console.log("onPaymentCompleted -----", {
197-
// paymentResponse,
198-
// component,
199-
// ps,
200-
// })
201-
// const paymentSource = await setPaymentSource({
202-
// paymentSourceId: ps.id,
203-
// paymentResource: "checkout_com_payments",
204-
// attributes: {
205-
// token: paymentResponse.id,
206-
// _authorize: true,
207-
// },
208-
// })
209-
// console.log("paymentSource", { paymentSource })
210-
// },
195+
onPaymentCompleted: async (component, paymentResponse) => {
196+
console.log("onPaymentCompleted -----", {
197+
paymentResponse,
198+
component,
199+
ps,
200+
})
201+
// const paymentSource = await setPaymentSource({
202+
// paymentSourceId: ps.id,
203+
// paymentResource: "checkout_com_payments",
204+
// attributes: {
205+
// token: paymentResponse.id,
206+
// _authorize: true,
207+
// },
208+
// })
209+
// console.log("paymentSource", { paymentSource })
210+
},
211211
} satisfies CheckoutWebComponent)
212-
// const flowComponent = checkout.create("flow")
213-
const flowComponent = checkout.create("card")
214-
if (await flowComponent.isAvailable()) {
215-
flowComponent.mount(document.getElementById("flow-container"))
216-
}
217-
// flowComponent.mount(document.getElementById("flow-container"))
212+
const flowComponent = checkout.create("flow")
213+
flowComponent.mount(document.getElementById("flow-container"))
218214
}
219215
loadFlow()
220216
}

0 commit comments

Comments
 (0)