@pandait.tech/payment-nuvei 0.3.0 → 0.4.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/README.md +33 -0
- package/dist/handlers/index.cjs +2 -1
- package/dist/handlers/index.cjs.map +1 -1
- package/dist/handlers/index.js +2 -1
- package/dist/handlers/index.js.map +1 -1
- package/dist/ui/styles.css +1 -1
- package/package.json +24 -11
package/dist/handlers/index.js
CHANGED
|
@@ -894,7 +894,8 @@ function createWebhookHandler(deps) {
|
|
|
894
894
|
logger.log(
|
|
895
895
|
`Webhook: Order ${orderId} \u2192 ${newStatus} (status_detail: ${transaction.status_detail})`
|
|
896
896
|
);
|
|
897
|
-
|
|
897
|
+
const transitionedToPaid = newStatus === "paid" && !finalStatuses.includes(currentStatus);
|
|
898
|
+
if (transitionedToPaid && deps.onPaymentSucceeded) {
|
|
898
899
|
try {
|
|
899
900
|
await deps.onPaymentSucceeded({ ...orderData, id: orderId });
|
|
900
901
|
} catch (err) {
|