Forráskód Böngészése

官方klarna不调paymentCallback 接口

zgl 1 napja
szülő
commit
9619ea4fa1

+ 4 - 1
src/app/(checkout)/checkout/_components/CheckoutPlaceOrder.tsx

@@ -249,7 +249,9 @@ export default function CheckoutPlaceOrder({
                         async function(res) {
                             console.log('klarna authorize res ---- ',res);
                             if(res.approved && res.authorization_token) { // 可以支付
-
+                                overlayLoading.stop();
+                                router.replace('/paymentresult/result?orderId=' + webOrderId + '&return_result=success');
+                                /*
                                 const resCallback = await createPaymentCallback({
                                     orderId: Number(webOrderId),
                                     gatewayOrderId: res.authorization_token,
@@ -271,6 +273,7 @@ export default function CheckoutPlaceOrder({
                                     });
                                     
                                 }
+                                */
 
                             } else {
                                 // if(res.show_form) { // klarna可用,但是有报错

+ 4 - 1
src/app/(checkout)/checkout/_components/ContinueToPay/PaymentMethodContinueTpPay.tsx

@@ -376,7 +376,9 @@ export function PaymentMethodContinueTpPay({
                         async function(res) {
                             console.log('klarna authorize res ---- ',res);
                             if(res.approved && res.authorization_token) { // 可以支付
-
+                                overlayLoading.stop();
+                                router.replace('/paymentresult/result?orderId=' + webOrderId + '&return_result=success');
+                                /*
                                 const resCallback = await createPaymentCallback({
                                     orderId: Number(webOrderId),
                                     gatewayOrderId: res.authorization_token,
@@ -398,6 +400,7 @@ export function PaymentMethodContinueTpPay({
                                     });
                                     
                                 }
+                                */
 
                             } else {
                                 // if(res.show_form) { // klarna可用,但是有报错