@@ -192,29 +192,25 @@ export function CheckoutComPayment({
192
192
onError : ( component , error ) => {
193
193
console . error ( "onError" , { error } , "Component" , component . type )
194
194
} ,
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
+ } ,
211
211
} 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" ) )
218
214
}
219
215
loadFlow ( )
220
216
}
0 commit comments