@infosoftas/s4-orders-js-sdk 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.release-it.json +2 -1
- package/package.json +1 -1
- package/src/App.tsx +2 -17
package/.release-it.json
CHANGED
package/package.json
CHANGED
package/src/App.tsx
CHANGED
|
@@ -102,23 +102,8 @@ const App: FC<ConfigType> = ({
|
|
|
102
102
|
setFailedMsg('');
|
|
103
103
|
setErrorsMsg([]);
|
|
104
104
|
try {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
if (data.orderId) {
|
|
108
|
-
await handleOrderDelete(data.orderId);
|
|
109
|
-
}
|
|
110
|
-
} catch (error) {
|
|
111
|
-
console.log(error);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
setLoading(false);
|
|
115
|
-
setOrderId(null);
|
|
116
|
-
setOrderInfo(null);
|
|
117
|
-
setIframeSrc(null);
|
|
118
|
-
setIsConfirmed(false);
|
|
119
|
-
setShowOrderForm(true);
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
105
|
+
// There is no way to detect the difference between "cancelled" and "accepted" payment for Vipps via UI
|
|
106
|
+
// Completing an order for cancelled payment is fine. The backend handles it correctly.
|
|
122
107
|
|
|
123
108
|
await orderComplete(orderId || data.orderId || '');
|
|
124
109
|
setIsConfirmed(true);
|