diff --git a/packages/evershop/src/modules/stripe/api/stripeWebHook/[bodyJson]webhook.js b/packages/evershop/src/modules/stripe/api/stripeWebHook/[bodyJson]webhook.js index 30f0a45e6..2e2b03d01 100644 --- a/packages/evershop/src/modules/stripe/api/stripeWebHook/[bodyJson]webhook.js +++ b/packages/evershop/src/modules/stripe/api/stripeWebHook/[bodyJson]webhook.js @@ -14,6 +14,7 @@ const { getConfig } = require('@evershop/evershop/src/lib/util/getConfig'); const { emit } = require('@evershop/evershop/src/lib/event/emitter'); const { debug } = require('@evershop/evershop/src/lib/log/debuger'); const { getSetting } = require('../../../setting/services/setting'); +const { display } = require('zero-decimal-currencies'); // eslint-disable-next-line no-unused-vars module.exports = async (request, response, delegate, next) => { @@ -56,7 +57,7 @@ module.exports = async (request, response, delegate, next) => { // Create payment transaction await insert('payment_transaction') .given({ - amount: paymentIntent.amount, + amount: parseFloat(display(paymentIntent.amount, paymentIntent.currency)), payment_transaction_order_id: order.order_id, transaction_id: paymentIntent.id, transaction_type: 'online',