@unchainedshop/plugins 4.3.5 → 4.4.0
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 +137 -0
- package/lib/delivery/post.d.ts +0 -1
- package/lib/delivery/post.js +0 -1
- package/lib/delivery/send-message.d.ts +0 -1
- package/lib/delivery/send-message.js +0 -1
- package/lib/delivery/stores.d.ts +0 -1
- package/lib/delivery/stores.js +0 -1
- package/lib/enrollments/licensed.d.ts +0 -1
- package/lib/enrollments/licensed.js +0 -1
- package/lib/events/aws-eventbridge.d.ts +0 -1
- package/lib/events/aws-eventbridge.js +0 -3
- package/lib/events/node-event-emitter.d.ts +0 -1
- package/lib/events/node-event-emitter.js +0 -1
- package/lib/events/redis.d.ts +0 -1
- package/lib/events/redis.js +0 -1
- package/lib/files/gridfs/adapter.d.ts +3 -4
- package/lib/files/gridfs/adapter.js +6 -6
- package/lib/files/gridfs/handler-express.d.ts +2 -3
- package/lib/files/gridfs/handler-express.js +6 -9
- package/lib/files/gridfs/handler-fastify.d.ts +1 -2
- package/lib/files/gridfs/handler-fastify.js +6 -9
- package/lib/files/gridfs/index.d.ts +2 -3
- package/lib/files/gridfs/index.js +2 -3
- package/lib/files/gridfs/module.d.ts +0 -1
- package/lib/files/gridfs/module.js +0 -4
- package/lib/files/gridfs/sign.d.ts +0 -1
- package/lib/files/gridfs/sign.js +0 -1
- package/lib/files/minio/handler-express.d.ts +0 -1
- package/lib/files/minio/handler-express.js +0 -1
- package/lib/files/minio/handler-fastify.d.ts +1 -2
- package/lib/files/minio/handler-fastify.js +2 -1
- package/lib/files/minio/index.d.ts +1 -2
- package/lib/files/minio/index.js +1 -5
- package/lib/filters/local-search.d.ts +1 -2
- package/lib/filters/local-search.js +3 -6
- package/lib/filters/strict-equal.d.ts +0 -1
- package/lib/filters/strict-equal.js +0 -1
- package/lib/payment/apple-iap/adapter.d.ts +0 -1
- package/lib/payment/apple-iap/adapter.js +3 -5
- package/lib/payment/apple-iap/db/AppleTransactionsCollection.d.ts +1 -2
- package/lib/payment/apple-iap/db/AppleTransactionsCollection.js +2 -1
- package/lib/payment/apple-iap/fix-periods.d.ts +1 -2
- package/lib/payment/apple-iap/fix-periods.js +1 -1
- package/lib/payment/apple-iap/handler-express.d.ts +0 -1
- package/lib/payment/apple-iap/handler-express.js +2 -5
- package/lib/payment/apple-iap/handler-fastify.d.ts +1 -2
- package/lib/payment/apple-iap/handler-fastify.js +4 -5
- package/lib/payment/apple-iap/index.d.ts +2 -3
- package/lib/payment/apple-iap/index.js +2 -3
- package/lib/payment/apple-iap/module.d.ts +1 -2
- package/lib/payment/apple-iap/module.js +1 -2
- package/lib/payment/apple-iap/verify-receipt.d.ts +0 -1
- package/lib/payment/apple-iap/verify-receipt.js +0 -4
- package/lib/payment/braintree.d.ts +0 -1
- package/lib/payment/braintree.js +0 -5
- package/lib/payment/cryptopay/db/CryptopayTransactions.d.ts +1 -2
- package/lib/payment/cryptopay/db/CryptopayTransactions.js +2 -1
- package/lib/payment/cryptopay/denote-amount.d.ts +0 -24
- package/lib/payment/cryptopay/denote-amount.js +2 -26
- package/lib/payment/cryptopay/derive-btc-address.d.ts +0 -1
- package/lib/payment/cryptopay/derive-btc-address.js +4 -14
- package/lib/payment/cryptopay/derive-eth-address.d.ts +0 -1
- package/lib/payment/cryptopay/derive-eth-address.js +1 -3
- package/lib/payment/cryptopay/handle-webhook.d.ts +2 -3
- package/lib/payment/cryptopay/handle-webhook.js +3 -3
- package/lib/payment/cryptopay/handler-express.d.ts +0 -1
- package/lib/payment/cryptopay/handler-express.js +1 -2
- package/lib/payment/cryptopay/handler-fastify.d.ts +1 -2
- package/lib/payment/cryptopay/handler-fastify.js +2 -2
- package/lib/payment/cryptopay/index.d.ts +2 -3
- package/lib/payment/cryptopay/index.js +2 -3
- package/lib/payment/cryptopay/module.d.ts +1 -2
- package/lib/payment/cryptopay/module.js +2 -3
- package/lib/payment/cryptopay/plugin.d.ts +1 -2
- package/lib/payment/cryptopay/plugin.js +8 -37
- package/lib/payment/datatrans-v2/api/authorize.d.ts +1 -2
- package/lib/payment/datatrans-v2/api/authorize.js +0 -2
- package/lib/payment/datatrans-v2/api/authorizeAuthenticated.d.ts +1 -2
- package/lib/payment/datatrans-v2/api/authorizeAuthenticated.js +0 -1
- package/lib/payment/datatrans-v2/api/cancel.d.ts +1 -2
- package/lib/payment/datatrans-v2/api/cancel.js +0 -1
- package/lib/payment/datatrans-v2/api/index.d.ts +8 -9
- package/lib/payment/datatrans-v2/api/index.js +9 -10
- package/lib/payment/datatrans-v2/api/init.d.ts +1 -2
- package/lib/payment/datatrans-v2/api/init.js +2 -4
- package/lib/payment/datatrans-v2/api/makeFetcher.d.ts +0 -1
- package/lib/payment/datatrans-v2/api/makeFetcher.js +0 -3
- package/lib/payment/datatrans-v2/api/secureFields.d.ts +1 -2
- package/lib/payment/datatrans-v2/api/secureFields.js +1 -3
- package/lib/payment/datatrans-v2/api/settle.d.ts +1 -2
- package/lib/payment/datatrans-v2/api/settle.js +0 -1
- package/lib/payment/datatrans-v2/api/status.d.ts +1 -2
- package/lib/payment/datatrans-v2/api/status.js +0 -1
- package/lib/payment/datatrans-v2/api/types.d.ts +0 -1
- package/lib/payment/datatrans-v2/api/types.js +0 -1
- package/lib/payment/datatrans-v2/api/validate.d.ts +1 -2
- package/lib/payment/datatrans-v2/api/validate.js +0 -1
- package/lib/payment/datatrans-v2/generateSignature.d.ts +0 -1
- package/lib/payment/datatrans-v2/generateSignature.js +0 -2
- package/lib/payment/datatrans-v2/getPaths.d.ts +0 -1
- package/lib/payment/datatrans-v2/getPaths.js +0 -1
- package/lib/payment/datatrans-v2/handler-express.d.ts +0 -1
- package/lib/payment/datatrans-v2/handler-express.js +1 -2
- package/lib/payment/datatrans-v2/handler-fastify.d.ts +1 -2
- package/lib/payment/datatrans-v2/handler-fastify.js +1 -2
- package/lib/payment/datatrans-v2/index.d.ts +0 -1
- package/lib/payment/datatrans-v2/index.js +3 -14
- package/lib/payment/datatrans-v2/parseRegistrationData.d.ts +4 -5
- package/lib/payment/datatrans-v2/parseRegistrationData.js +1 -2
- package/lib/payment/datatrans-v2/roundedAmountFromOrder.d.ts +1 -2
- package/lib/payment/datatrans-v2/roundedAmountFromOrder.js +0 -1
- package/lib/payment/datatrans-v2/splitProperties.d.ts +0 -1
- package/lib/payment/datatrans-v2/splitProperties.js +0 -2
- package/lib/payment/invoice-prepaid.d.ts +0 -1
- package/lib/payment/invoice-prepaid.js +0 -1
- package/lib/payment/invoice.d.ts +0 -1
- package/lib/payment/invoice.js +0 -1
- package/lib/payment/paypal-checkout.d.ts +0 -1
- package/lib/payment/paypal-checkout.js +0 -11
- package/lib/payment/payrexx/api/index.d.ts +15 -15
- package/lib/payment/payrexx/api/index.js +15 -27
- package/lib/payment/payrexx/api/makeFetcher.d.ts +0 -1
- package/lib/payment/payrexx/api/makeFetcher.js +0 -1
- package/lib/payment/payrexx/handler-express.d.ts +0 -1
- package/lib/payment/payrexx/handler-express.js +0 -4
- package/lib/payment/payrexx/handler-fastify.d.ts +1 -2
- package/lib/payment/payrexx/handler-fastify.js +0 -4
- package/lib/payment/payrexx/index.d.ts +0 -1
- package/lib/payment/payrexx/index.js +9 -35
- package/lib/payment/payrexx/payrexx.d.ts +0 -1
- package/lib/payment/payrexx/payrexx.js +0 -1
- package/lib/payment/postfinance-checkout/api-client.d.ts +0 -1
- package/lib/payment/postfinance-checkout/api-client.js +0 -6
- package/lib/payment/postfinance-checkout/api-types.d.ts +49 -44
- package/lib/payment/postfinance-checkout/api-types.js +43 -51
- package/lib/payment/postfinance-checkout/api.d.ts +1 -2
- package/lib/payment/postfinance-checkout/api.js +2 -3
- package/lib/payment/postfinance-checkout/handler-express.d.ts +0 -1
- package/lib/payment/postfinance-checkout/handler-express.js +1 -2
- package/lib/payment/postfinance-checkout/handler-fastify.d.ts +1 -2
- package/lib/payment/postfinance-checkout/handler-fastify.js +1 -2
- package/lib/payment/postfinance-checkout/index.d.ts +2 -3
- package/lib/payment/postfinance-checkout/index.js +7 -10
- package/lib/payment/postfinance-checkout/types.d.ts +11 -10
- package/lib/payment/postfinance-checkout/types.js +9 -12
- package/lib/payment/postfinance-checkout/utils.d.ts +2 -3
- package/lib/payment/postfinance-checkout/utils.js +1 -2
- package/lib/payment/saferpay/adapter.d.ts +1 -2
- package/lib/payment/saferpay/adapter.js +2 -5
- package/lib/payment/saferpay/api/api/SaferpayClient.d.ts +6 -7
- package/lib/payment/saferpay/api/api/SaferpayClient.js +2 -2
- package/lib/payment/saferpay/api/api/SaferpayConnection.d.ts +0 -1
- package/lib/payment/saferpay/api/api/SaferpayConnection.js +0 -1
- package/lib/payment/saferpay/api/index.d.ts +4 -5
- package/lib/payment/saferpay/api/index.js +1 -2
- package/lib/payment/saferpay/api/models/PaymentMethods.d.ts +0 -1
- package/lib/payment/saferpay/api/models/PaymentMethods.js +0 -1
- package/lib/payment/saferpay/api/models/PaymentPageAssert.d.ts +4 -5
- package/lib/payment/saferpay/api/models/PaymentPageAssert.js +0 -1
- package/lib/payment/saferpay/api/models/PaymentPageInitialize.d.ts +4 -5
- package/lib/payment/saferpay/api/models/PaymentPageInitialize.js +0 -1
- package/lib/payment/saferpay/api/models/Request.d.ts +0 -1
- package/lib/payment/saferpay/api/models/Request.js +0 -1
- package/lib/payment/saferpay/api/models/Response.d.ts +0 -1
- package/lib/payment/saferpay/api/models/Response.js +0 -1
- package/lib/payment/saferpay/api/models/Transaction.d.ts +0 -1
- package/lib/payment/saferpay/api/models/Transaction.js +0 -1
- package/lib/payment/saferpay/api/models/TransactionCancel.d.ts +2 -3
- package/lib/payment/saferpay/api/models/TransactionCancel.js +0 -1
- package/lib/payment/saferpay/api/models/TransactionCapture.d.ts +3 -4
- package/lib/payment/saferpay/api/models/TransactionCapture.js +0 -1
- package/lib/payment/saferpay/buildSignature.d.ts +0 -1
- package/lib/payment/saferpay/buildSignature.js +0 -1
- package/lib/payment/saferpay/db/SaferpayTransactionsCollection.d.ts +1 -2
- package/lib/payment/saferpay/db/SaferpayTransactionsCollection.js +1 -1
- package/lib/payment/saferpay/getReturnPath.d.ts +0 -1
- package/lib/payment/saferpay/getReturnPath.js +0 -1
- package/lib/payment/saferpay/handler-express.d.ts +0 -1
- package/lib/payment/saferpay/handler-express.js +1 -2
- package/lib/payment/saferpay/handler-fastify.d.ts +1 -2
- package/lib/payment/saferpay/handler-fastify.js +1 -2
- package/lib/payment/saferpay/index.d.ts +2 -3
- package/lib/payment/saferpay/index.js +2 -3
- package/lib/payment/saferpay/module.d.ts +2 -3
- package/lib/payment/saferpay/module.js +2 -2
- package/lib/payment/stripe/handler-express.d.ts +0 -1
- package/lib/payment/stripe/handler-express.js +1 -2
- package/lib/payment/stripe/handler-fastify.d.ts +1 -2
- package/lib/payment/stripe/handler-fastify.js +1 -2
- package/lib/payment/stripe/index.d.ts +0 -1
- package/lib/payment/stripe/index.js +1 -4
- package/lib/payment/stripe/stripe.d.ts +1 -2
- package/lib/payment/stripe/stripe.js +1 -2
- package/lib/presets/all-express.d.ts +1 -2
- package/lib/presets/all-express.js +9 -10
- package/lib/presets/all-fastify.d.ts +2 -3
- package/lib/presets/all-fastify.js +9 -10
- package/lib/presets/all.d.ts +23 -24
- package/lib/presets/all.js +20 -25
- package/lib/presets/base-express.d.ts +0 -1
- package/lib/presets/base-express.js +1 -2
- package/lib/presets/base-fastify.d.ts +1 -2
- package/lib/presets/base-fastify.js +1 -3
- package/lib/presets/base.d.ts +23 -24
- package/lib/presets/base.js +23 -33
- package/lib/presets/countries/ch.d.ts +2 -3
- package/lib/presets/countries/ch.js +2 -3
- package/lib/presets/crypto-express.d.ts +1 -2
- package/lib/presets/crypto-express.js +2 -3
- package/lib/presets/crypto-fastify.d.ts +1 -2
- package/lib/presets/crypto-fastify.js +2 -3
- package/lib/presets/crypto.d.ts +6 -7
- package/lib/presets/crypto.js +6 -8
- package/lib/pricing/delivery-swiss-tax.d.ts +1 -2
- package/lib/pricing/delivery-swiss-tax.js +2 -3
- package/lib/pricing/discount-100-off.d.ts +1 -2
- package/lib/pricing/discount-100-off.js +0 -4
- package/lib/pricing/discount-half-price-manual.d.ts +1 -2
- package/lib/pricing/discount-half-price-manual.js +0 -4
- package/lib/pricing/discount-half-price.d.ts +1 -2
- package/lib/pricing/discount-half-price.js +0 -4
- package/lib/pricing/free-delivery.d.ts +1 -2
- package/lib/pricing/free-delivery.js +0 -1
- package/lib/pricing/free-payment.d.ts +1 -2
- package/lib/pricing/free-payment.js +0 -1
- package/lib/pricing/order-delivery.d.ts +1 -2
- package/lib/pricing/order-delivery.js +0 -2
- package/lib/pricing/order-discount.d.ts +1 -2
- package/lib/pricing/order-discount.js +0 -4
- package/lib/pricing/order-items-discount.d.ts +0 -1
- package/lib/pricing/order-items-discount.js +0 -5
- package/lib/pricing/order-items.d.ts +0 -1
- package/lib/pricing/order-items.js +0 -2
- package/lib/pricing/order-payment.d.ts +0 -1
- package/lib/pricing/order-payment.js +0 -2
- package/lib/pricing/order-round.d.ts +1 -2
- package/lib/pricing/order-round.js +0 -6
- package/lib/pricing/product-catalog-price-options.d.ts +0 -1
- package/lib/pricing/product-catalog-price-options.js +0 -1
- package/lib/pricing/product-catalog-price.d.ts +1 -2
- package/lib/pricing/product-catalog-price.js +2 -3
- package/lib/pricing/product-discount.d.ts +0 -1
- package/lib/pricing/product-discount.js +0 -1
- package/lib/pricing/product-price-rateconversion.d.ts +1 -2
- package/lib/pricing/product-price-rateconversion.js +0 -4
- package/lib/pricing/product-round.d.ts +1 -2
- package/lib/pricing/product-round.js +0 -1
- package/lib/pricing/product-swiss-tax.d.ts +1 -2
- package/lib/pricing/product-swiss-tax.js +2 -5
- package/lib/pricing/tax/ch.d.ts +2 -3
- package/lib/pricing/tax/ch.js +0 -1
- package/lib/pricing/utils/isDeliveryAddressInCountry.d.ts +1 -2
- package/lib/pricing/utils/isDeliveryAddressInCountry.js +0 -1
- package/lib/quotations/manual.d.ts +0 -1
- package/lib/quotations/manual.js +0 -1
- package/lib/warehousing/eth-minter.d.ts +0 -1
- package/lib/warehousing/eth-minter.js +2 -11
- package/lib/warehousing/store.d.ts +0 -1
- package/lib/warehousing/store.js +0 -1
- package/lib/worker/budgetsms.d.ts +0 -1
- package/lib/worker/budgetsms.js +4 -52
- package/lib/worker/bulk-import.d.ts +1 -2
- package/lib/worker/bulk-import.js +1 -3
- package/lib/worker/bulkgate.d.ts +0 -1
- package/lib/worker/bulkgate.js +7 -20
- package/lib/worker/email.d.ts +0 -1
- package/lib/worker/email.js +0 -3
- package/lib/worker/enrollment-order-generator.d.ts +0 -1
- package/lib/worker/enrollment-order-generator.js +1 -2
- package/lib/worker/error-notifications.d.ts +1 -2
- package/lib/worker/error-notifications.js +0 -1
- package/lib/worker/export-token.d.ts +1 -2
- package/lib/worker/export-token.js +1 -2
- package/lib/worker/external.d.ts +1 -2
- package/lib/worker/external.js +0 -1
- package/lib/worker/heartbeat.d.ts +0 -1
- package/lib/worker/heartbeat.js +0 -1
- package/lib/worker/http-request.d.ts +1 -2
- package/lib/worker/http-request.js +0 -3
- package/lib/worker/message.d.ts +2 -3
- package/lib/worker/message.js +2 -3
- package/lib/worker/push-notification.d.ts +0 -1
- package/lib/worker/push-notification.js +0 -1
- package/lib/worker/twilio.d.ts +0 -1
- package/lib/worker/twilio.js +1 -2
- package/lib/worker/update-coinbase-rates.d.ts +0 -1
- package/lib/worker/update-coinbase-rates.js +1 -3
- package/lib/worker/update-ecb-rates.d.ts +0 -1
- package/lib/worker/update-ecb-rates.js +0 -3
- package/lib/worker/update-token-ownership.d.ts +1 -2
- package/lib/worker/update-token-ownership.js +0 -1
- package/lib/worker/zombie-killer.d.ts +1 -2
- package/lib/worker/zombie-killer.js +0 -7
- package/package.json +20 -19
- package/lib/delivery/post.d.ts.map +0 -1
- package/lib/delivery/post.js.map +0 -1
- package/lib/delivery/send-message.d.ts.map +0 -1
- package/lib/delivery/send-message.js.map +0 -1
- package/lib/delivery/stores.d.ts.map +0 -1
- package/lib/delivery/stores.js.map +0 -1
- package/lib/enrollments/licensed.d.ts.map +0 -1
- package/lib/enrollments/licensed.js.map +0 -1
- package/lib/events/aws-eventbridge.d.ts.map +0 -1
- package/lib/events/aws-eventbridge.js.map +0 -1
- package/lib/events/node-event-emitter.d.ts.map +0 -1
- package/lib/events/node-event-emitter.js.map +0 -1
- package/lib/events/redis.d.ts.map +0 -1
- package/lib/events/redis.js.map +0 -1
- package/lib/files/gridfs/adapter.d.ts.map +0 -1
- package/lib/files/gridfs/adapter.js.map +0 -1
- package/lib/files/gridfs/handler-express.d.ts.map +0 -1
- package/lib/files/gridfs/handler-express.js.map +0 -1
- package/lib/files/gridfs/handler-fastify.d.ts.map +0 -1
- package/lib/files/gridfs/handler-fastify.js.map +0 -1
- package/lib/files/gridfs/index.d.ts.map +0 -1
- package/lib/files/gridfs/index.js.map +0 -1
- package/lib/files/gridfs/module.d.ts.map +0 -1
- package/lib/files/gridfs/module.js.map +0 -1
- package/lib/files/gridfs/sign.d.ts.map +0 -1
- package/lib/files/gridfs/sign.js.map +0 -1
- package/lib/files/minio/handler-express.d.ts.map +0 -1
- package/lib/files/minio/handler-express.js.map +0 -1
- package/lib/files/minio/handler-fastify.d.ts.map +0 -1
- package/lib/files/minio/handler-fastify.js.map +0 -1
- package/lib/files/minio/index.d.ts.map +0 -1
- package/lib/files/minio/index.js.map +0 -1
- package/lib/filters/local-search.d.ts.map +0 -1
- package/lib/filters/local-search.js.map +0 -1
- package/lib/filters/strict-equal.d.ts.map +0 -1
- package/lib/filters/strict-equal.js.map +0 -1
- package/lib/payment/apple-iap/adapter.d.ts.map +0 -1
- package/lib/payment/apple-iap/adapter.js.map +0 -1
- package/lib/payment/apple-iap/db/AppleTransactionsCollection.d.ts.map +0 -1
- package/lib/payment/apple-iap/db/AppleTransactionsCollection.js.map +0 -1
- package/lib/payment/apple-iap/fix-periods.d.ts.map +0 -1
- package/lib/payment/apple-iap/fix-periods.js.map +0 -1
- package/lib/payment/apple-iap/handler-express.d.ts.map +0 -1
- package/lib/payment/apple-iap/handler-express.js.map +0 -1
- package/lib/payment/apple-iap/handler-fastify.d.ts.map +0 -1
- package/lib/payment/apple-iap/handler-fastify.js.map +0 -1
- package/lib/payment/apple-iap/index.d.ts.map +0 -1
- package/lib/payment/apple-iap/index.js.map +0 -1
- package/lib/payment/apple-iap/module.d.ts.map +0 -1
- package/lib/payment/apple-iap/module.js.map +0 -1
- package/lib/payment/apple-iap/verify-receipt.d.ts.map +0 -1
- package/lib/payment/apple-iap/verify-receipt.js.map +0 -1
- package/lib/payment/braintree.d.ts.map +0 -1
- package/lib/payment/braintree.js.map +0 -1
- package/lib/payment/cryptopay/db/CryptopayTransactions.d.ts.map +0 -1
- package/lib/payment/cryptopay/db/CryptopayTransactions.js.map +0 -1
- package/lib/payment/cryptopay/denote-amount.d.ts.map +0 -1
- package/lib/payment/cryptopay/denote-amount.js.map +0 -1
- package/lib/payment/cryptopay/derive-btc-address.d.ts.map +0 -1
- package/lib/payment/cryptopay/derive-btc-address.js.map +0 -1
- package/lib/payment/cryptopay/derive-eth-address.d.ts.map +0 -1
- package/lib/payment/cryptopay/derive-eth-address.js.map +0 -1
- package/lib/payment/cryptopay/handle-webhook.d.ts.map +0 -1
- package/lib/payment/cryptopay/handle-webhook.js.map +0 -1
- package/lib/payment/cryptopay/handler-express.d.ts.map +0 -1
- package/lib/payment/cryptopay/handler-express.js.map +0 -1
- package/lib/payment/cryptopay/handler-fastify.d.ts.map +0 -1
- package/lib/payment/cryptopay/handler-fastify.js.map +0 -1
- package/lib/payment/cryptopay/index.d.ts.map +0 -1
- package/lib/payment/cryptopay/index.js.map +0 -1
- package/lib/payment/cryptopay/module.d.ts.map +0 -1
- package/lib/payment/cryptopay/module.js.map +0 -1
- package/lib/payment/cryptopay/plugin.d.ts.map +0 -1
- package/lib/payment/cryptopay/plugin.js.map +0 -1
- package/lib/payment/datatrans-v2/api/authorize.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/api/authorize.js.map +0 -1
- package/lib/payment/datatrans-v2/api/authorizeAuthenticated.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/api/authorizeAuthenticated.js.map +0 -1
- package/lib/payment/datatrans-v2/api/cancel.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/api/cancel.js.map +0 -1
- package/lib/payment/datatrans-v2/api/index.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/api/index.js.map +0 -1
- package/lib/payment/datatrans-v2/api/init.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/api/init.js.map +0 -1
- package/lib/payment/datatrans-v2/api/makeFetcher.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/api/makeFetcher.js.map +0 -1
- package/lib/payment/datatrans-v2/api/secureFields.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/api/secureFields.js.map +0 -1
- package/lib/payment/datatrans-v2/api/settle.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/api/settle.js.map +0 -1
- package/lib/payment/datatrans-v2/api/status.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/api/status.js.map +0 -1
- package/lib/payment/datatrans-v2/api/types.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/api/types.js.map +0 -1
- package/lib/payment/datatrans-v2/api/validate.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/api/validate.js.map +0 -1
- package/lib/payment/datatrans-v2/generateSignature.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/generateSignature.js.map +0 -1
- package/lib/payment/datatrans-v2/getPaths.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/getPaths.js.map +0 -1
- package/lib/payment/datatrans-v2/handler-express.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/handler-express.js.map +0 -1
- package/lib/payment/datatrans-v2/handler-fastify.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/handler-fastify.js.map +0 -1
- package/lib/payment/datatrans-v2/index.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/index.js.map +0 -1
- package/lib/payment/datatrans-v2/parseRegistrationData.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/parseRegistrationData.js.map +0 -1
- package/lib/payment/datatrans-v2/roundedAmountFromOrder.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/roundedAmountFromOrder.js.map +0 -1
- package/lib/payment/datatrans-v2/splitProperties.d.ts.map +0 -1
- package/lib/payment/datatrans-v2/splitProperties.js.map +0 -1
- package/lib/payment/invoice-prepaid.d.ts.map +0 -1
- package/lib/payment/invoice-prepaid.js.map +0 -1
- package/lib/payment/invoice.d.ts.map +0 -1
- package/lib/payment/invoice.js.map +0 -1
- package/lib/payment/paypal-checkout.d.ts.map +0 -1
- package/lib/payment/paypal-checkout.js.map +0 -1
- package/lib/payment/payrexx/api/index.d.ts.map +0 -1
- package/lib/payment/payrexx/api/index.js.map +0 -1
- package/lib/payment/payrexx/api/makeFetcher.d.ts.map +0 -1
- package/lib/payment/payrexx/api/makeFetcher.js.map +0 -1
- package/lib/payment/payrexx/handler-express.d.ts.map +0 -1
- package/lib/payment/payrexx/handler-express.js.map +0 -1
- package/lib/payment/payrexx/handler-fastify.d.ts.map +0 -1
- package/lib/payment/payrexx/handler-fastify.js.map +0 -1
- package/lib/payment/payrexx/index.d.ts.map +0 -1
- package/lib/payment/payrexx/index.js.map +0 -1
- package/lib/payment/payrexx/payrexx.d.ts.map +0 -1
- package/lib/payment/payrexx/payrexx.js.map +0 -1
- package/lib/payment/postfinance-checkout/api-client.d.ts.map +0 -1
- package/lib/payment/postfinance-checkout/api-client.js.map +0 -1
- package/lib/payment/postfinance-checkout/api-types.d.ts.map +0 -1
- package/lib/payment/postfinance-checkout/api-types.js.map +0 -1
- package/lib/payment/postfinance-checkout/api.d.ts.map +0 -1
- package/lib/payment/postfinance-checkout/api.js.map +0 -1
- package/lib/payment/postfinance-checkout/handler-express.d.ts.map +0 -1
- package/lib/payment/postfinance-checkout/handler-express.js.map +0 -1
- package/lib/payment/postfinance-checkout/handler-fastify.d.ts.map +0 -1
- package/lib/payment/postfinance-checkout/handler-fastify.js.map +0 -1
- package/lib/payment/postfinance-checkout/index.d.ts.map +0 -1
- package/lib/payment/postfinance-checkout/index.js.map +0 -1
- package/lib/payment/postfinance-checkout/types.d.ts.map +0 -1
- package/lib/payment/postfinance-checkout/types.js.map +0 -1
- package/lib/payment/postfinance-checkout/utils.d.ts.map +0 -1
- package/lib/payment/postfinance-checkout/utils.js.map +0 -1
- package/lib/payment/saferpay/adapter.d.ts.map +0 -1
- package/lib/payment/saferpay/adapter.js.map +0 -1
- package/lib/payment/saferpay/api/api/SaferpayClient.d.ts.map +0 -1
- package/lib/payment/saferpay/api/api/SaferpayClient.js.map +0 -1
- package/lib/payment/saferpay/api/api/SaferpayConnection.d.ts.map +0 -1
- package/lib/payment/saferpay/api/api/SaferpayConnection.js.map +0 -1
- package/lib/payment/saferpay/api/index.d.ts.map +0 -1
- package/lib/payment/saferpay/api/index.js.map +0 -1
- package/lib/payment/saferpay/api/models/PaymentMethods.d.ts.map +0 -1
- package/lib/payment/saferpay/api/models/PaymentMethods.js.map +0 -1
- package/lib/payment/saferpay/api/models/PaymentPageAssert.d.ts.map +0 -1
- package/lib/payment/saferpay/api/models/PaymentPageAssert.js.map +0 -1
- package/lib/payment/saferpay/api/models/PaymentPageInitialize.d.ts.map +0 -1
- package/lib/payment/saferpay/api/models/PaymentPageInitialize.js.map +0 -1
- package/lib/payment/saferpay/api/models/Request.d.ts.map +0 -1
- package/lib/payment/saferpay/api/models/Request.js.map +0 -1
- package/lib/payment/saferpay/api/models/Response.d.ts.map +0 -1
- package/lib/payment/saferpay/api/models/Response.js.map +0 -1
- package/lib/payment/saferpay/api/models/Transaction.d.ts.map +0 -1
- package/lib/payment/saferpay/api/models/Transaction.js.map +0 -1
- package/lib/payment/saferpay/api/models/TransactionCancel.d.ts.map +0 -1
- package/lib/payment/saferpay/api/models/TransactionCancel.js.map +0 -1
- package/lib/payment/saferpay/api/models/TransactionCapture.d.ts.map +0 -1
- package/lib/payment/saferpay/api/models/TransactionCapture.js.map +0 -1
- package/lib/payment/saferpay/buildSignature.d.ts.map +0 -1
- package/lib/payment/saferpay/buildSignature.js.map +0 -1
- package/lib/payment/saferpay/db/SaferpayTransactionsCollection.d.ts.map +0 -1
- package/lib/payment/saferpay/db/SaferpayTransactionsCollection.js.map +0 -1
- package/lib/payment/saferpay/getReturnPath.d.ts.map +0 -1
- package/lib/payment/saferpay/getReturnPath.js.map +0 -1
- package/lib/payment/saferpay/handler-express.d.ts.map +0 -1
- package/lib/payment/saferpay/handler-express.js.map +0 -1
- package/lib/payment/saferpay/handler-fastify.d.ts.map +0 -1
- package/lib/payment/saferpay/handler-fastify.js.map +0 -1
- package/lib/payment/saferpay/index.d.ts.map +0 -1
- package/lib/payment/saferpay/index.js.map +0 -1
- package/lib/payment/saferpay/module.d.ts.map +0 -1
- package/lib/payment/saferpay/module.js.map +0 -1
- package/lib/payment/stripe/handler-express.d.ts.map +0 -1
- package/lib/payment/stripe/handler-express.js.map +0 -1
- package/lib/payment/stripe/handler-fastify.d.ts.map +0 -1
- package/lib/payment/stripe/handler-fastify.js.map +0 -1
- package/lib/payment/stripe/index.d.ts.map +0 -1
- package/lib/payment/stripe/index.js.map +0 -1
- package/lib/payment/stripe/stripe.d.ts.map +0 -1
- package/lib/payment/stripe/stripe.js.map +0 -1
- package/lib/presets/all-express.d.ts.map +0 -1
- package/lib/presets/all-express.js.map +0 -1
- package/lib/presets/all-fastify.d.ts.map +0 -1
- package/lib/presets/all-fastify.js.map +0 -1
- package/lib/presets/all.d.ts.map +0 -1
- package/lib/presets/all.js.map +0 -1
- package/lib/presets/base-express.d.ts.map +0 -1
- package/lib/presets/base-express.js.map +0 -1
- package/lib/presets/base-fastify.d.ts.map +0 -1
- package/lib/presets/base-fastify.js.map +0 -1
- package/lib/presets/base.d.ts.map +0 -1
- package/lib/presets/base.js.map +0 -1
- package/lib/presets/countries/ch.d.ts.map +0 -1
- package/lib/presets/countries/ch.js.map +0 -1
- package/lib/presets/crypto-express.d.ts.map +0 -1
- package/lib/presets/crypto-express.js.map +0 -1
- package/lib/presets/crypto-fastify.d.ts.map +0 -1
- package/lib/presets/crypto-fastify.js.map +0 -1
- package/lib/presets/crypto.d.ts.map +0 -1
- package/lib/presets/crypto.js.map +0 -1
- package/lib/pricing/delivery-swiss-tax.d.ts.map +0 -1
- package/lib/pricing/delivery-swiss-tax.js.map +0 -1
- package/lib/pricing/discount-100-off.d.ts.map +0 -1
- package/lib/pricing/discount-100-off.js.map +0 -1
- package/lib/pricing/discount-half-price-manual.d.ts.map +0 -1
- package/lib/pricing/discount-half-price-manual.js.map +0 -1
- package/lib/pricing/discount-half-price.d.ts.map +0 -1
- package/lib/pricing/discount-half-price.js.map +0 -1
- package/lib/pricing/free-delivery.d.ts.map +0 -1
- package/lib/pricing/free-delivery.js.map +0 -1
- package/lib/pricing/free-payment.d.ts.map +0 -1
- package/lib/pricing/free-payment.js.map +0 -1
- package/lib/pricing/order-delivery.d.ts.map +0 -1
- package/lib/pricing/order-delivery.js.map +0 -1
- package/lib/pricing/order-discount.d.ts.map +0 -1
- package/lib/pricing/order-discount.js.map +0 -1
- package/lib/pricing/order-items-discount.d.ts.map +0 -1
- package/lib/pricing/order-items-discount.js.map +0 -1
- package/lib/pricing/order-items.d.ts.map +0 -1
- package/lib/pricing/order-items.js.map +0 -1
- package/lib/pricing/order-payment.d.ts.map +0 -1
- package/lib/pricing/order-payment.js.map +0 -1
- package/lib/pricing/order-round.d.ts.map +0 -1
- package/lib/pricing/order-round.js.map +0 -1
- package/lib/pricing/product-catalog-price-options.d.ts.map +0 -1
- package/lib/pricing/product-catalog-price-options.js.map +0 -1
- package/lib/pricing/product-catalog-price.d.ts.map +0 -1
- package/lib/pricing/product-catalog-price.js.map +0 -1
- package/lib/pricing/product-discount.d.ts.map +0 -1
- package/lib/pricing/product-discount.js.map +0 -1
- package/lib/pricing/product-price-rateconversion.d.ts.map +0 -1
- package/lib/pricing/product-price-rateconversion.js.map +0 -1
- package/lib/pricing/product-round.d.ts.map +0 -1
- package/lib/pricing/product-round.js.map +0 -1
- package/lib/pricing/product-swiss-tax.d.ts.map +0 -1
- package/lib/pricing/product-swiss-tax.js.map +0 -1
- package/lib/pricing/tax/ch.d.ts.map +0 -1
- package/lib/pricing/tax/ch.js.map +0 -1
- package/lib/pricing/utils/isDeliveryAddressInCountry.d.ts.map +0 -1
- package/lib/pricing/utils/isDeliveryAddressInCountry.js.map +0 -1
- package/lib/quotations/manual.d.ts.map +0 -1
- package/lib/quotations/manual.js.map +0 -1
- package/lib/warehousing/eth-minter.d.ts.map +0 -1
- package/lib/warehousing/eth-minter.js.map +0 -1
- package/lib/warehousing/store.d.ts.map +0 -1
- package/lib/warehousing/store.js.map +0 -1
- package/lib/worker/budgetsms.d.ts.map +0 -1
- package/lib/worker/budgetsms.js.map +0 -1
- package/lib/worker/bulk-import.d.ts.map +0 -1
- package/lib/worker/bulk-import.js.map +0 -1
- package/lib/worker/bulkgate.d.ts.map +0 -1
- package/lib/worker/bulkgate.js.map +0 -1
- package/lib/worker/email.d.ts.map +0 -1
- package/lib/worker/email.js.map +0 -1
- package/lib/worker/enrollment-order-generator.d.ts.map +0 -1
- package/lib/worker/enrollment-order-generator.js.map +0 -1
- package/lib/worker/error-notifications.d.ts.map +0 -1
- package/lib/worker/error-notifications.js.map +0 -1
- package/lib/worker/export-token.d.ts.map +0 -1
- package/lib/worker/export-token.js.map +0 -1
- package/lib/worker/external.d.ts.map +0 -1
- package/lib/worker/external.js.map +0 -1
- package/lib/worker/heartbeat.d.ts.map +0 -1
- package/lib/worker/heartbeat.js.map +0 -1
- package/lib/worker/http-request.d.ts.map +0 -1
- package/lib/worker/http-request.js.map +0 -1
- package/lib/worker/message.d.ts.map +0 -1
- package/lib/worker/message.js.map +0 -1
- package/lib/worker/push-notification.d.ts.map +0 -1
- package/lib/worker/push-notification.js.map +0 -1
- package/lib/worker/twilio.d.ts.map +0 -1
- package/lib/worker/twilio.js.map +0 -1
- package/lib/worker/update-coinbase-rates.d.ts.map +0 -1
- package/lib/worker/update-coinbase-rates.js.map +0 -1
- package/lib/worker/update-ecb-rates.d.ts.map +0 -1
- package/lib/worker/update-ecb-rates.js.map +0 -1
- package/lib/worker/update-token-ownership.d.ts.map +0 -1
- package/lib/worker/update-token-ownership.js.map +0 -1
- package/lib/worker/zombie-killer.d.ts.map +0 -1
- package/lib/worker/zombie-killer.js.map +0 -1
- package/readme.md +0 -5
- package/src/delivery/post.ts +0 -30
- package/src/delivery/send-message.ts +0 -50
- package/src/delivery/stores.ts +0 -53
- package/src/enrollments/licensed.ts +0 -61
- package/src/events/aws-eventbridge.ts +0 -45
- package/src/events/node-event-emitter.ts +0 -18
- package/src/events/redis.ts +0 -34
- package/src/files/gridfs/adapter.ts +0 -176
- package/src/files/gridfs/handler-express.ts +0 -145
- package/src/files/gridfs/handler-fastify.ts +0 -177
- package/src/files/gridfs/index.ts +0 -6
- package/src/files/gridfs/module.ts +0 -54
- package/src/files/gridfs/sign.ts +0 -28
- package/src/files/minio/handler-express.ts +0 -35
- package/src/files/minio/handler-fastify.ts +0 -44
- package/src/files/minio/index.ts +0 -232
- package/src/filters/local-search.ts +0 -101
- package/src/filters/strict-equal.ts +0 -30
- package/src/payment/apple-iap/adapter.ts +0 -153
- package/src/payment/apple-iap/db/AppleTransactionsCollection.ts +0 -14
- package/src/payment/apple-iap/fix-periods.ts +0 -31
- package/src/payment/apple-iap/handler-express.ts +0 -140
- package/src/payment/apple-iap/handler-fastify.ts +0 -147
- package/src/payment/apple-iap/index.ts +0 -6
- package/src/payment/apple-iap/module.ts +0 -34
- package/src/payment/apple-iap/verify-receipt.ts +0 -27
- package/src/payment/braintree.ts +0 -167
- package/src/payment/cryptopay/db/CryptopayTransactions.ts +0 -16
- package/src/payment/cryptopay/denote-amount.test.ts +0 -28
- package/src/payment/cryptopay/denote-amount.ts +0 -29
- package/src/payment/cryptopay/derive-btc-address.test.ts +0 -22
- package/src/payment/cryptopay/derive-btc-address.ts +0 -46
- package/src/payment/cryptopay/derive-eth-address.test.ts +0 -22
- package/src/payment/cryptopay/derive-eth-address.ts +0 -40
- package/src/payment/cryptopay/handle-webhook.ts +0 -103
- package/src/payment/cryptopay/handler-express.ts +0 -21
- package/src/payment/cryptopay/handler-fastify.ts +0 -24
- package/src/payment/cryptopay/index.ts +0 -7
- package/src/payment/cryptopay/module.ts +0 -138
- package/src/payment/cryptopay/plugin.ts +0 -282
- package/src/payment/cryptopay/readme.md +0 -23
- package/src/payment/datatrans-v2/api/authorize.ts +0 -17
- package/src/payment/datatrans-v2/api/authorizeAuthenticated.ts +0 -20
- package/src/payment/datatrans-v2/api/cancel.ts +0 -13
- package/src/payment/datatrans-v2/api/index.ts +0 -24
- package/src/payment/datatrans-v2/api/init.ts +0 -43
- package/src/payment/datatrans-v2/api/makeFetcher.ts +0 -52
- package/src/payment/datatrans-v2/api/secureFields.ts +0 -19
- package/src/payment/datatrans-v2/api/settle.ts +0 -13
- package/src/payment/datatrans-v2/api/status.ts +0 -8
- package/src/payment/datatrans-v2/api/types.ts +0 -378
- package/src/payment/datatrans-v2/api/validate.ts +0 -13
- package/src/payment/datatrans-v2/generateSignature.test.ts +0 -18
- package/src/payment/datatrans-v2/generateSignature.ts +0 -36
- package/src/payment/datatrans-v2/getPaths.ts +0 -25
- package/src/payment/datatrans-v2/handler-express.ts +0 -91
- package/src/payment/datatrans-v2/handler-fastify.ts +0 -97
- package/src/payment/datatrans-v2/index.ts +0 -524
- package/src/payment/datatrans-v2/parseRegistrationData.ts +0 -34
- package/src/payment/datatrans-v2/roundedAmountFromOrder.ts +0 -16
- package/src/payment/datatrans-v2/splitProperties.ts +0 -58
- package/src/payment/invoice-prepaid.ts +0 -40
- package/src/payment/invoice.ts +0 -36
- package/src/payment/paypal-checkout.ts +0 -127
- package/src/payment/payrexx/api/index.ts +0 -84
- package/src/payment/payrexx/api/makeFetcher.ts +0 -83
- package/src/payment/payrexx/handler-express.ts +0 -93
- package/src/payment/payrexx/handler-fastify.ts +0 -105
- package/src/payment/payrexx/index.ts +0 -248
- package/src/payment/payrexx/payrexx.ts +0 -65
- package/src/payment/payrexx/readme.md +0 -4
- package/src/payment/postfinance-checkout/api-client.ts +0 -111
- package/src/payment/postfinance-checkout/api-types.ts +0 -111
- package/src/payment/postfinance-checkout/api.ts +0 -114
- package/src/payment/postfinance-checkout/handler-express.ts +0 -44
- package/src/payment/postfinance-checkout/handler-fastify.ts +0 -53
- package/src/payment/postfinance-checkout/index.ts +0 -271
- package/src/payment/postfinance-checkout/types.ts +0 -27
- package/src/payment/postfinance-checkout/utils.ts +0 -39
- package/src/payment/saferpay/adapter.ts +0 -273
- package/src/payment/saferpay/api/api/SaferpayClient.ts +0 -79
- package/src/payment/saferpay/api/api/SaferpayConnection.ts +0 -36
- package/src/payment/saferpay/api/index.ts +0 -8
- package/src/payment/saferpay/api/models/PaymentMethods.ts +0 -26
- package/src/payment/saferpay/api/models/PaymentPageAssert.ts +0 -75
- package/src/payment/saferpay/api/models/PaymentPageInitialize.ts +0 -58
- package/src/payment/saferpay/api/models/Request.ts +0 -14
- package/src/payment/saferpay/api/models/Response.ts +0 -9
- package/src/payment/saferpay/api/models/Transaction.ts +0 -6
- package/src/payment/saferpay/api/models/TransactionCancel.ts +0 -15
- package/src/payment/saferpay/api/models/TransactionCapture.ts +0 -20
- package/src/payment/saferpay/buildSignature.ts +0 -9
- package/src/payment/saferpay/db/SaferpayTransactionsCollection.ts +0 -13
- package/src/payment/saferpay/getReturnPath.ts +0 -10
- package/src/payment/saferpay/handler-express.ts +0 -71
- package/src/payment/saferpay/handler-fastify.ts +0 -80
- package/src/payment/saferpay/index.ts +0 -6
- package/src/payment/saferpay/module.ts +0 -41
- package/src/payment/stripe/handler-express.ts +0 -135
- package/src/payment/stripe/handler-fastify.ts +0 -151
- package/src/payment/stripe/index.ts +0 -163
- package/src/payment/stripe/readme.md +0 -12
- package/src/payment/stripe/stripe.ts +0 -137
- package/src/presets/all-express.ts +0 -51
- package/src/presets/all-fastify.ts +0 -72
- package/src/presets/all.ts +0 -37
- package/src/presets/base-express.ts +0 -7
- package/src/presets/base-fastify.ts +0 -20
- package/src/presets/base.ts +0 -42
- package/src/presets/countries/ch.ts +0 -2
- package/src/presets/crypto-express.ts +0 -12
- package/src/presets/crypto-fastify.ts +0 -15
- package/src/presets/crypto.ts +0 -11
- package/src/pricing/delivery-swiss-tax.ts +0 -78
- package/src/pricing/discount-100-off.test.ts +0 -41
- package/src/pricing/discount-100-off.ts +0 -48
- package/src/pricing/discount-half-price-manual.test.ts +0 -52
- package/src/pricing/discount-half-price-manual.ts +0 -47
- package/src/pricing/discount-half-price.test.ts +0 -52
- package/src/pricing/discount-half-price.ts +0 -50
- package/src/pricing/free-delivery.test.ts +0 -10
- package/src/pricing/free-delivery.ts +0 -36
- package/src/pricing/free-payment.ts +0 -37
- package/src/pricing/licenced-enrollment.test.ts +0 -38
- package/src/pricing/order-delivery.test.ts +0 -9
- package/src/pricing/order-delivery.ts +0 -47
- package/src/pricing/order-discount.test.ts +0 -10
- package/src/pricing/order-discount.ts +0 -123
- package/src/pricing/order-items-discount.ts +0 -86
- package/src/pricing/order-items.ts +0 -61
- package/src/pricing/order-payment.ts +0 -48
- package/src/pricing/order-round.ts +0 -174
- package/src/pricing/plugins-index.test.ts +0 -5
- package/src/pricing/product-catalog-price-options.ts +0 -67
- package/src/pricing/product-catalog-price.ts +0 -71
- package/src/pricing/product-discount.ts +0 -97
- package/src/pricing/product-price-rateconversion.ts +0 -74
- package/src/pricing/product-round.ts +0 -66
- package/src/pricing/product-swiss-tax.ts +0 -102
- package/src/pricing/tax/ch.test.ts +0 -20
- package/src/pricing/tax/ch.ts +0 -65
- package/src/pricing/utils/isDeliveryAddressInCountry.test.ts +0 -106
- package/src/pricing/utils/isDeliveryAddressInCountry.ts +0 -26
- package/src/quotations/manual.ts +0 -26
- package/src/warehousing/eth-minter.ts +0 -167
- package/src/warehousing/store.ts +0 -45
- package/src/worker/budgetsms.ts +0 -268
- package/src/worker/bulk-import.ts +0 -77
- package/src/worker/bulkgate.ts +0 -138
- package/src/worker/email.ts +0 -165
- package/src/worker/enrollment-order-generator.ts +0 -94
- package/src/worker/error-notifications.ts +0 -83
- package/src/worker/export-token.ts +0 -32
- package/src/worker/external.ts +0 -17
- package/src/worker/heartbeat.ts +0 -37
- package/src/worker/http-request.ts +0 -71
- package/src/worker/message.ts +0 -56
- package/src/worker/push-notification.ts +0 -121
- package/src/worker/twilio.ts +0 -78
- package/src/worker/update-coinbase-rates.ts +0 -76
- package/src/worker/update-ecb-rates.ts +0 -115
- package/src/worker/update-token-ownership.ts +0 -70
- package/src/worker/zombie-killer.ts +0 -139
- package/tests/mock/datatrans/v1/secure-fields.json +0 -4
- package/tests/mock/datatrans/v1/transactions/authorize.json +0 -48
- package/tests/mock/datatrans/v1/transactions/card_check_authorized.json +0 -47
- package/tests/mock/datatrans/v1/transactions/payment_alias_authorized/settle.json +0 -1
- package/tests/mock/datatrans/v1/transactions/payment_alias_authorized.json +0 -48
- package/tests/mock/datatrans/v1/transactions/payment_authorized/cancel.json +0 -1
- package/tests/mock/datatrans/v1/transactions/payment_authorized/settle.json +0 -1
- package/tests/mock/datatrans/v1/transactions/payment_authorized.json +0 -48
- package/tests/mock/datatrans/v1/transactions/payment_authorized_low_amount/cancel.json +0 -1
- package/tests/mock/datatrans/v1/transactions/payment_authorized_low_amount.json +0 -48
- package/tests/mock/datatrans/v1/transactions/validate.json +0 -1
- package/tests/mock/datatrans/v1/transactions.json +0 -4
- package/tests/mock/payrexx/Gateway/1000001.json +0 -106
- package/tests/mock/payrexx/Gateway.json +0 -24
- package/tests/mock/payrexx/transaction_example1.json +0 -65
- package/tests/mock/payrexx/transaction_example2.json +0 -65
- package/tests/mock/payrexx/transaction_example3.json +0 -94
- package/tsconfig.json +0 -9
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createLogger } from '@unchainedshop/logger';
|
|
2
|
-
import { mapOrderDataToGatewayObject, mapUserToGatewayObject } from
|
|
3
|
-
import createPayrexxAPI, { GatewayObjectStatus } from
|
|
2
|
+
import { mapOrderDataToGatewayObject, mapUserToGatewayObject } from "./payrexx.js";
|
|
3
|
+
import createPayrexxAPI, { GatewayObjectStatus } from "./api/index.js";
|
|
4
4
|
import { OrderPricingSheet, PaymentAdapter, PaymentDirector, PaymentError, } from '@unchainedshop/core';
|
|
5
5
|
const logger = createLogger('unchained:payrexx');
|
|
6
6
|
const Payrexx = {
|
|
@@ -39,7 +39,6 @@ const Payrexx = {
|
|
|
39
39
|
throw new Error('No order in context, can only sign with order context');
|
|
40
40
|
const api = createPayrexxAPI(instance, process.env.PAYREXX_SECRET);
|
|
41
41
|
if (orderPayment) {
|
|
42
|
-
// Order Checkout signing (One-time payment)
|
|
43
42
|
const pricing = OrderPricingSheet({
|
|
44
43
|
calculation: order.calculation,
|
|
45
44
|
currencyCode: order.currencyCode,
|
|
@@ -48,7 +47,6 @@ const Payrexx = {
|
|
|
48
47
|
const gateway = await api.createGateway(gatewayObject);
|
|
49
48
|
return JSON.stringify(gateway);
|
|
50
49
|
}
|
|
51
|
-
// Payment Credential Registration signing
|
|
52
50
|
const user = userId && (await modules.users.findUserById(userId));
|
|
53
51
|
if (!user)
|
|
54
52
|
throw new Error('User not found, can only sign registrations with user context');
|
|
@@ -60,25 +58,8 @@ const Payrexx = {
|
|
|
60
58
|
}));
|
|
61
59
|
return JSON.stringify(gateway);
|
|
62
60
|
},
|
|
63
|
-
|
|
64
|
-
// if (!credentials.meta) return false;
|
|
65
|
-
// const { objectKey, currency } = credentials.meta;
|
|
66
|
-
// const result = await api().validate({
|
|
67
|
-
// refno: Buffer.from(`valid-${new Date().getTime()}`, 'hex').toString('base64'),
|
|
68
|
-
// currency,
|
|
69
|
-
// [objectKey]: JSON.parse(credentials.token),
|
|
70
|
-
// });
|
|
71
|
-
// return Boolean((result as ValidateResponseSuccess)?.transactionId);
|
|
72
|
-
// },
|
|
73
|
-
async register( /* transactionResponse */) {
|
|
74
|
-
// const { transactionId } = transactionResponse;
|
|
61
|
+
async register() {
|
|
75
62
|
throw new Error('Not implemented');
|
|
76
|
-
// const result = (await api().status({
|
|
77
|
-
// transactionId,
|
|
78
|
-
// })) as StatusResponseSuccess;
|
|
79
|
-
// if (result.transactionId) {
|
|
80
|
-
// return await parseRegistrationData(result);
|
|
81
|
-
// }
|
|
82
63
|
return null;
|
|
83
64
|
},
|
|
84
65
|
async confirm() {
|
|
@@ -92,17 +73,15 @@ const Payrexx = {
|
|
|
92
73
|
if (!gatewayObject) {
|
|
93
74
|
return false;
|
|
94
75
|
}
|
|
95
|
-
if (
|
|
96
|
-
// gatewayObject.status === GatewayObjectStatus.authorized || // authorized is only used for tokenization!
|
|
97
|
-
gatewayObject.status === GatewayObjectStatus.reserved) {
|
|
76
|
+
if (gatewayObject.status === GatewayObjectStatus.reserved) {
|
|
98
77
|
const allTransactions = gatewayObject.invoices?.flatMap((invoice) => invoice.transactions);
|
|
99
78
|
await Promise.all(allTransactions.map(async (transaction) => api.chargePreAuthorized(transaction.id, { referenceId: '__IGNORE_WEBHOOK__' })));
|
|
100
79
|
return true;
|
|
101
80
|
}
|
|
102
81
|
if (gatewayObject.status === GatewayObjectStatus.confirmed) {
|
|
103
|
-
return true;
|
|
82
|
+
return true;
|
|
104
83
|
}
|
|
105
|
-
return false;
|
|
84
|
+
return false;
|
|
106
85
|
},
|
|
107
86
|
async cancel() {
|
|
108
87
|
const { orderPayment } = context;
|
|
@@ -121,9 +100,9 @@ const Payrexx = {
|
|
|
121
100
|
return true;
|
|
122
101
|
}
|
|
123
102
|
if (gatewayObject.status === GatewayObjectStatus.confirmed) {
|
|
124
|
-
return false;
|
|
103
|
+
return false;
|
|
125
104
|
}
|
|
126
|
-
return true;
|
|
105
|
+
return true;
|
|
127
106
|
},
|
|
128
107
|
charge: async ({ gatewayId, paymentCredentials }) => {
|
|
129
108
|
if (!gatewayId && !paymentCredentials) {
|
|
@@ -144,9 +123,7 @@ const Payrexx = {
|
|
|
144
123
|
currencyCode: order.currencyCode,
|
|
145
124
|
});
|
|
146
125
|
const { currencyCode, amount } = pricing.total({ useNetPrice: false });
|
|
147
|
-
if (
|
|
148
|
-
// gatewayObject.status === 'authorized' || // authorized is only used for tokenization!
|
|
149
|
-
gatewayObject.status === 'reserved' ||
|
|
126
|
+
if (gatewayObject.status === 'reserved' ||
|
|
150
127
|
gatewayObject.status === 'confirmed') {
|
|
151
128
|
try {
|
|
152
129
|
if (gatewayObject.currency !== currencyCode.toUpperCase() ||
|
|
@@ -156,7 +133,6 @@ const Payrexx = {
|
|
|
156
133
|
if (gatewayObject.referenceId !== orderPayment?._id) {
|
|
157
134
|
throw new Error('The order payment is different from the initiating intent');
|
|
158
135
|
}
|
|
159
|
-
// confirm will do the transition, to do a checkout those stati above are fine
|
|
160
136
|
logger.info(`Mark as charged, status is ${gatewayObject.status}`, {
|
|
161
137
|
orderPaymentId: gatewayObject.referenceId,
|
|
162
138
|
});
|
|
@@ -167,7 +143,6 @@ const Payrexx = {
|
|
|
167
143
|
}
|
|
168
144
|
catch (e) {
|
|
169
145
|
if (gatewayObject.status === GatewayObjectStatus.reserved) {
|
|
170
|
-
// Cancel the reservation if it's reserved and the order has been manipulated
|
|
171
146
|
const allTransactions = gatewayObject.invoices?.flatMap((invoice) => invoice.transactions);
|
|
172
147
|
await Promise.all(allTransactions.map(async (transaction) => api.deleteReservation(transaction.id)));
|
|
173
148
|
}
|
|
@@ -185,4 +160,3 @@ const Payrexx = {
|
|
|
185
160
|
},
|
|
186
161
|
};
|
|
187
162
|
PaymentDirector.registerAdapter(Payrexx);
|
|
188
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -8,10 +8,8 @@ export class PostFinanceApiClient {
|
|
|
8
8
|
const version = '1';
|
|
9
9
|
const timestamp = Math.floor(Date.now() / 1000).toString();
|
|
10
10
|
const userId = this.config.userId.toString();
|
|
11
|
-
// Use path as-is since it already includes /api from the URL
|
|
12
11
|
const resourcePath = path;
|
|
13
12
|
const dataToSign = [version, userId, timestamp, method, resourcePath].join('|');
|
|
14
|
-
// Use Web Crypto API instead of crypto.createHmac
|
|
15
13
|
const secretBytes = Uint8Array.from(atob(this.config.apiSecret), (c) => c.charCodeAt(0));
|
|
16
14
|
const key = await crypto.subtle.importKey('raw', secretBytes, { name: 'HMAC', hash: 'SHA-512' }, false, ['sign']);
|
|
17
15
|
const signature = await crypto.subtle.sign('HMAC', key, new TextEncoder().encode(dataToSign));
|
|
@@ -26,7 +24,6 @@ export class PostFinanceApiClient {
|
|
|
26
24
|
async request(method, endpoint, body) {
|
|
27
25
|
const url = `${API_BASE_URL}${endpoint}`;
|
|
28
26
|
const urlObj = new URL(url);
|
|
29
|
-
// Include both pathname and search (query parameters) for MAC signature
|
|
30
27
|
const pathWithQuery = urlObj.pathname + urlObj.search;
|
|
31
28
|
const macHeaders = await this.generateMacHeaders(method, pathWithQuery);
|
|
32
29
|
const headers = {
|
|
@@ -53,8 +50,6 @@ export class PostFinanceApiClient {
|
|
|
53
50
|
return JSON.parse(responseText);
|
|
54
51
|
}
|
|
55
52
|
catch {
|
|
56
|
-
// If JSON parsing fails but content-type is json, return as text
|
|
57
|
-
// This handles PostFinance's payment-page-url endpoint that returns plain text with json content-type
|
|
58
53
|
return responseText;
|
|
59
54
|
}
|
|
60
55
|
}
|
|
@@ -72,4 +67,3 @@ export class PostFinanceApiClient {
|
|
|
72
67
|
return this.request('PATCH', endpoint, body);
|
|
73
68
|
}
|
|
74
69
|
}
|
|
75
|
-
//# sourceMappingURL=api-client.js.map
|
|
@@ -1,46 +1,52 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
CREATE
|
|
3
|
-
PENDING
|
|
4
|
-
CONFIRMED
|
|
5
|
-
PROCESSING
|
|
6
|
-
FAILED
|
|
7
|
-
AUTHORIZED
|
|
8
|
-
VOIDED
|
|
9
|
-
COMPLETED
|
|
10
|
-
FULFILL
|
|
11
|
-
DECLINE
|
|
12
|
-
}
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
1
|
+
export declare const TransactionState: {
|
|
2
|
+
readonly CREATE: "CREATE";
|
|
3
|
+
readonly PENDING: "PENDING";
|
|
4
|
+
readonly CONFIRMED: "CONFIRMED";
|
|
5
|
+
readonly PROCESSING: "PROCESSING";
|
|
6
|
+
readonly FAILED: "FAILED";
|
|
7
|
+
readonly AUTHORIZED: "AUTHORIZED";
|
|
8
|
+
readonly VOIDED: "VOIDED";
|
|
9
|
+
readonly COMPLETED: "COMPLETED";
|
|
10
|
+
readonly FULFILL: "FULFILL";
|
|
11
|
+
readonly DECLINE: "DECLINE";
|
|
12
|
+
};
|
|
13
|
+
export type TransactionState = (typeof TransactionState)[keyof typeof TransactionState];
|
|
14
|
+
export declare const TokenizationMode: {
|
|
15
|
+
readonly FORCE_UPDATE: "FORCE_UPDATE";
|
|
16
|
+
readonly ALLOW: "ALLOW";
|
|
17
|
+
readonly ALLOW_ONE_CLICK_PAYMENT: "ALLOW_ONE_CLICK_PAYMENT";
|
|
18
|
+
readonly DENY: "DENY";
|
|
19
|
+
};
|
|
20
|
+
export type TokenizationMode = (typeof TokenizationMode)[keyof typeof TokenizationMode];
|
|
21
|
+
export declare const TransactionCompletionBehavior: {
|
|
22
|
+
readonly COMPLETE_IMMEDIATELY: "COMPLETE_IMMEDIATELY";
|
|
23
|
+
readonly COMPLETE_DEFERRED: "COMPLETE_DEFERRED";
|
|
24
|
+
readonly USE_CONFIGURATION: "USE_CONFIGURATION";
|
|
25
|
+
};
|
|
26
|
+
export type TransactionCompletionBehavior = (typeof TransactionCompletionBehavior)[keyof typeof TransactionCompletionBehavior];
|
|
27
|
+
export declare const LineItemType: {
|
|
28
|
+
readonly SHIPPING: "SHIPPING";
|
|
29
|
+
readonly DISCOUNT: "DISCOUNT";
|
|
30
|
+
readonly FEE: "FEE";
|
|
31
|
+
readonly PRODUCT: "PRODUCT";
|
|
32
|
+
readonly TIP: "TIP";
|
|
33
|
+
};
|
|
34
|
+
export type LineItemType = (typeof LineItemType)[keyof typeof LineItemType];
|
|
35
|
+
export declare const RefundType: {
|
|
36
|
+
readonly MERCHANT_INITIATED_ONLINE: "MERCHANT_INITIATED_ONLINE";
|
|
37
|
+
readonly MERCHANT_INITIATED_OFFLINE: "MERCHANT_INITIATED_OFFLINE";
|
|
38
|
+
readonly CUSTOMER_INITIATED_AUTOMATIC: "CUSTOMER_INITIATED_AUTOMATIC";
|
|
39
|
+
readonly CUSTOMER_INITIATED_MANUAL: "CUSTOMER_INITIATED_MANUAL";
|
|
40
|
+
};
|
|
41
|
+
export type RefundType = (typeof RefundType)[keyof typeof RefundType];
|
|
42
|
+
export declare const CreationEntityState: {
|
|
43
|
+
readonly CREATE: "CREATE";
|
|
44
|
+
readonly ACTIVE: "ACTIVE";
|
|
45
|
+
readonly INACTIVE: "INACTIVE";
|
|
46
|
+
readonly DELETING: "DELETING";
|
|
47
|
+
readonly DELETED: "DELETED";
|
|
48
|
+
};
|
|
49
|
+
export type CreationEntityState = (typeof CreationEntityState)[keyof typeof CreationEntityState];
|
|
44
50
|
export interface LineItem {
|
|
45
51
|
name: string;
|
|
46
52
|
type: LineItemType;
|
|
@@ -95,4 +101,3 @@ export interface Refund {
|
|
|
95
101
|
amount: number;
|
|
96
102
|
transaction: number;
|
|
97
103
|
}
|
|
98
|
-
//# sourceMappingURL=api-types.d.ts.map
|
|
@@ -1,51 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
(function (CreationEntityState) {
|
|
45
|
-
CreationEntityState["CREATE"] = "CREATE";
|
|
46
|
-
CreationEntityState["ACTIVE"] = "ACTIVE";
|
|
47
|
-
CreationEntityState["INACTIVE"] = "INACTIVE";
|
|
48
|
-
CreationEntityState["DELETING"] = "DELETING";
|
|
49
|
-
CreationEntityState["DELETED"] = "DELETED";
|
|
50
|
-
})(CreationEntityState || (CreationEntityState = {}));
|
|
51
|
-
//# sourceMappingURL=api-types.js.map
|
|
1
|
+
export const TransactionState = {
|
|
2
|
+
CREATE: 'CREATE',
|
|
3
|
+
PENDING: 'PENDING',
|
|
4
|
+
CONFIRMED: 'CONFIRMED',
|
|
5
|
+
PROCESSING: 'PROCESSING',
|
|
6
|
+
FAILED: 'FAILED',
|
|
7
|
+
AUTHORIZED: 'AUTHORIZED',
|
|
8
|
+
VOIDED: 'VOIDED',
|
|
9
|
+
COMPLETED: 'COMPLETED',
|
|
10
|
+
FULFILL: 'FULFILL',
|
|
11
|
+
DECLINE: 'DECLINE',
|
|
12
|
+
};
|
|
13
|
+
export const TokenizationMode = {
|
|
14
|
+
FORCE_UPDATE: 'FORCE_UPDATE',
|
|
15
|
+
ALLOW: 'ALLOW',
|
|
16
|
+
ALLOW_ONE_CLICK_PAYMENT: 'ALLOW_ONE_CLICK_PAYMENT',
|
|
17
|
+
DENY: 'DENY',
|
|
18
|
+
};
|
|
19
|
+
export const TransactionCompletionBehavior = {
|
|
20
|
+
COMPLETE_IMMEDIATELY: 'COMPLETE_IMMEDIATELY',
|
|
21
|
+
COMPLETE_DEFERRED: 'COMPLETE_DEFERRED',
|
|
22
|
+
USE_CONFIGURATION: 'USE_CONFIGURATION',
|
|
23
|
+
};
|
|
24
|
+
export const LineItemType = {
|
|
25
|
+
SHIPPING: 'SHIPPING',
|
|
26
|
+
DISCOUNT: 'DISCOUNT',
|
|
27
|
+
FEE: 'FEE',
|
|
28
|
+
PRODUCT: 'PRODUCT',
|
|
29
|
+
TIP: 'TIP',
|
|
30
|
+
};
|
|
31
|
+
export const RefundType = {
|
|
32
|
+
MERCHANT_INITIATED_ONLINE: 'MERCHANT_INITIATED_ONLINE',
|
|
33
|
+
MERCHANT_INITIATED_OFFLINE: 'MERCHANT_INITIATED_OFFLINE',
|
|
34
|
+
CUSTOMER_INITIATED_AUTOMATIC: 'CUSTOMER_INITIATED_AUTOMATIC',
|
|
35
|
+
CUSTOMER_INITIATED_MANUAL: 'CUSTOMER_INITIATED_MANUAL',
|
|
36
|
+
};
|
|
37
|
+
export const CreationEntityState = {
|
|
38
|
+
CREATE: 'CREATE',
|
|
39
|
+
ACTIVE: 'ACTIVE',
|
|
40
|
+
INACTIVE: 'INACTIVE',
|
|
41
|
+
DELETING: 'DELETING',
|
|
42
|
+
DELETED: 'DELETED',
|
|
43
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Transaction, TransactionCreate, TransactionCompletion, Token } from './api-types.
|
|
1
|
+
import { type Transaction, type TransactionCreate, type TransactionCompletion, type Token } from './api-types.ts';
|
|
2
2
|
export declare const getTransaction: (transactionId: string) => Promise<Transaction>;
|
|
3
3
|
export declare const getTransactionCompletion: (id: string) => Promise<TransactionCompletion>;
|
|
4
4
|
export declare const getToken: (spaceId: number, tokenId: number) => Promise<Token>;
|
|
@@ -9,4 +9,3 @@ export declare const confirmDeferredTransaction: (transactionId: string) => Prom
|
|
|
9
9
|
export declare const getPaymentPageUrl: (transactionId: number) => Promise<string>;
|
|
10
10
|
export declare const getLightboxJavascriptUrl: (transactionId: number) => Promise<string>;
|
|
11
11
|
export declare const getIframeJavascriptUrl: (transactionId: number) => Promise<string>;
|
|
12
|
-
//# sourceMappingURL=api.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PostFinanceApiClient } from
|
|
2
|
-
import { RefundType, } from
|
|
1
|
+
import { PostFinanceApiClient } from "./api-client.js";
|
|
2
|
+
import { RefundType, } from "./api-types.js";
|
|
3
3
|
const { PFCHECKOUT_SPACE_ID, PFCHECKOUT_USER_ID, PFCHECKOUT_SECRET } = process.env;
|
|
4
4
|
const SPACE_ID = parseInt(PFCHECKOUT_SPACE_ID, 10);
|
|
5
5
|
const USER_ID = parseInt(PFCHECKOUT_USER_ID, 10);
|
|
@@ -82,4 +82,3 @@ export const getIframeJavascriptUrl = async (transactionId) => {
|
|
|
82
82
|
const result = await client.get(`/transaction-iframe/javascript-url?spaceId=${SPACE_ID}&id=${transactionId}`);
|
|
83
83
|
return result;
|
|
84
84
|
};
|
|
85
|
-
//# sourceMappingURL=api.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createLogger } from '@unchainedshop/logger';
|
|
2
|
-
import { getTransaction, getTransactionCompletion } from
|
|
2
|
+
import { getTransaction, getTransactionCompletion } from "./api.js";
|
|
3
3
|
const logger = createLogger('unchained:postfinance-checkout:handler');
|
|
4
4
|
export const postfinanceCheckoutHandler = async (req, res) => {
|
|
5
5
|
const context = req.unchainedContext;
|
|
@@ -35,4 +35,3 @@ export const postfinanceCheckoutHandler = async (req, res) => {
|
|
|
35
35
|
res.status(404).end();
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
|
-
//# sourceMappingURL=handler-express.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createLogger } from '@unchainedshop/logger';
|
|
2
|
-
import { getTransaction, getTransactionCompletion } from
|
|
2
|
+
import { getTransaction, getTransactionCompletion } from "./api.js";
|
|
3
3
|
const logger = createLogger('unchained:postfinance-checkout:handler');
|
|
4
4
|
export const postfinanceCheckoutHandler = async (req, reply) => {
|
|
5
5
|
const context = req.unchainedContext;
|
|
@@ -38,4 +38,3 @@ export const postfinanceCheckoutHandler = async (req, reply) => {
|
|
|
38
38
|
return reply.send();
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
|
-
//# sourceMappingURL=handler-fastify.js.map
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export * from './types.
|
|
2
|
-
export * from './api-types.
|
|
3
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export * from './types.ts';
|
|
2
|
+
export * from './api-types.ts';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createLogger } from '@unchainedshop/logger';
|
|
2
2
|
import { OrderPricingSheet, PaymentAdapter, PaymentDirector, PaymentError, } from '@unchainedshop/core';
|
|
3
|
-
import { confirmDeferredTransaction, createTransaction, getIframeJavascriptUrl, getLightboxJavascriptUrl, getPaymentPageUrl, getToken, getTransaction, refundTransaction, voidTransaction, } from
|
|
4
|
-
import { orderIsPaid } from
|
|
5
|
-
import { CompletionModes, IntegrationModes } from
|
|
6
|
-
import { LineItemType, TokenizationMode, TransactionCompletionBehavior, TransactionState, CreationEntityState, } from
|
|
3
|
+
import { confirmDeferredTransaction, createTransaction, getIframeJavascriptUrl, getLightboxJavascriptUrl, getPaymentPageUrl, getToken, getTransaction, refundTransaction, voidTransaction, } from "./api.js";
|
|
4
|
+
import { orderIsPaid } from "./utils.js";
|
|
5
|
+
import { CompletionModes, IntegrationModes } from "./types.js";
|
|
6
|
+
import { LineItemType, TokenizationMode, TransactionCompletionBehavior, TransactionState, CreationEntityState, } from "./api-types.js";
|
|
7
7
|
const { PFCHECKOUT_SPACE_ID, PFCHECKOUT_USER_ID, PFCHECKOUT_SECRET, PFCHECKOUT_SUCCESS_URL, PFCHECKOUT_FAILED_URL, } = process.env;
|
|
8
8
|
const logger = createLogger('unchained:postfinance-checkout');
|
|
9
9
|
const newError = ({ code, message }) => {
|
|
@@ -111,11 +111,10 @@ const PostfinanceCheckout = {
|
|
|
111
111
|
},
|
|
112
112
|
charge: async ({ transactionId, paymentCredentials, }) => {
|
|
113
113
|
if (paymentCredentials && !transactionId) {
|
|
114
|
-
// Directly charge the customer based on existing token!
|
|
115
114
|
throw new Error('Not implemented yet');
|
|
116
115
|
}
|
|
117
116
|
if (!transactionId)
|
|
118
|
-
return false;
|
|
117
|
+
return false;
|
|
119
118
|
const transaction = await getTransaction(transactionId);
|
|
120
119
|
if (!transaction) {
|
|
121
120
|
logger.error(`Transaction #${transactionId}: Transaction not found`);
|
|
@@ -169,7 +168,6 @@ const PostfinanceCheckout = {
|
|
|
169
168
|
currencyCode: order.currencyCode,
|
|
170
169
|
});
|
|
171
170
|
const totalAmount = pricing?.total({ useNetPrice: false }).amount;
|
|
172
|
-
// For immediate settlements, try refunding. For deferred settlements, void the transaction.
|
|
173
171
|
return ((refund && refundTransaction(transactionId, order._id, totalAmount / 100)) ||
|
|
174
172
|
voidTransaction(transactionId));
|
|
175
173
|
},
|
|
@@ -190,6 +188,5 @@ const PostfinanceCheckout = {
|
|
|
190
188
|
},
|
|
191
189
|
};
|
|
192
190
|
PaymentDirector.registerAdapter(PostfinanceCheckout);
|
|
193
|
-
export * from
|
|
194
|
-
export * from
|
|
195
|
-
//# sourceMappingURL=index.js.map
|
|
191
|
+
export * from "./types.js";
|
|
192
|
+
export * from "./api-types.js";
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
export declare
|
|
2
|
-
PaymentPage
|
|
3
|
-
Lightbox
|
|
4
|
-
iFrame
|
|
5
|
-
}
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
export declare const IntegrationModes: {
|
|
2
|
+
readonly PaymentPage: "PaymentPage";
|
|
3
|
+
readonly Lightbox: "Lightbox";
|
|
4
|
+
readonly iFrame: "iFrame";
|
|
5
|
+
};
|
|
6
|
+
export type IntegrationModes = (typeof IntegrationModes)[keyof typeof IntegrationModes];
|
|
7
|
+
export declare const CompletionModes: {
|
|
8
|
+
readonly Immediate: "Immediate";
|
|
9
|
+
readonly Deferred: "Deferred";
|
|
10
|
+
};
|
|
11
|
+
export type CompletionModes = (typeof CompletionModes)[keyof typeof CompletionModes];
|
|
10
12
|
export interface SignResponse {
|
|
11
13
|
transactionId: number;
|
|
12
14
|
location: string | null;
|
|
@@ -21,4 +23,3 @@ export interface WebhookData {
|
|
|
21
23
|
webhookListenerId: number;
|
|
22
24
|
timestamp: string;
|
|
23
25
|
}
|
|
24
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
CompletionModes["Deferred"] = "Deferred";
|
|
11
|
-
})(CompletionModes || (CompletionModes = {}));
|
|
12
|
-
//# sourceMappingURL=types.js.map
|
|
1
|
+
export const IntegrationModes = {
|
|
2
|
+
PaymentPage: 'PaymentPage',
|
|
3
|
+
Lightbox: 'Lightbox',
|
|
4
|
+
iFrame: 'iFrame',
|
|
5
|
+
};
|
|
6
|
+
export const CompletionModes = {
|
|
7
|
+
Immediate: 'Immediate',
|
|
8
|
+
Deferred: 'Deferred',
|
|
9
|
+
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Order } from '@unchainedshop/core-orders';
|
|
2
|
-
import { Transaction } from './api-types.
|
|
1
|
+
import type { Order } from '@unchainedshop/core-orders';
|
|
2
|
+
import { type Transaction } from './api-types.ts';
|
|
3
3
|
export declare const transactionIsPaid: (transaction: Transaction, expectedCurrency: string, expectedAmount: number) => Promise<boolean>;
|
|
4
4
|
export declare const orderIsPaid: (order: Order, transaction: Transaction) => Promise<boolean>;
|
|
5
|
-
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OrderPricingSheet } from '@unchainedshop/core';
|
|
2
|
-
import { TransactionState } from
|
|
2
|
+
import { TransactionState } from "./api-types.js";
|
|
3
3
|
const roundToDecimals = (number, decimals) => {
|
|
4
4
|
const num = Math.pow(10, decimals);
|
|
5
5
|
return Math.round(number * num) / num;
|
|
@@ -25,4 +25,3 @@ export const orderIsPaid = async (order, transaction) => {
|
|
|
25
25
|
const totalAmount = pricing.total({ useNetPrice: false }).amount / 100;
|
|
26
26
|
return transactionIsPaid(transaction, order.currencyCode, totalAmount);
|
|
27
27
|
};
|
|
28
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { mongodb } from '@unchainedshop/mongodb';
|
|
2
|
-
import { SaferpayClient } from
|
|
3
|
-
import { buildSignature } from
|
|
2
|
+
import { SaferpayClient } from "./api/index.js";
|
|
3
|
+
import { buildSignature } from "./buildSignature.js";
|
|
4
4
|
import { OrderPricingSheet, PaymentAdapter, PaymentDirector, PaymentError, } from '@unchainedshop/core';
|
|
5
5
|
const { SAFERPAY_BASE_URL = 'https://test.saferpay.com/api', SAFERPAY_CUSTOMER_ID, SAFERPAY_WEBHOOK_PATH = '/payment/saferpay/webhook', SAFERPAY_RETURN_PATH = '/saferpay/return', ROOT_URL = 'http://localhost:4010', EMAIL_WEBSITE_URL, SAFERPAY_USER, SAFERPAY_PW, } = process.env;
|
|
6
6
|
const newSaferpayError = ({ code, message }) => {
|
|
@@ -122,8 +122,6 @@ export const WordlineSaferpay = {
|
|
|
122
122
|
return {
|
|
123
123
|
transactionId,
|
|
124
124
|
settledTransaction: paymentPageAssert.Transaction,
|
|
125
|
-
// arbitraryFields,
|
|
126
|
-
// credentials,
|
|
127
125
|
};
|
|
128
126
|
}
|
|
129
127
|
throw newSaferpayError({
|
|
@@ -190,4 +188,3 @@ export const WordlineSaferpay = {
|
|
|
190
188
|
},
|
|
191
189
|
};
|
|
192
190
|
PaymentDirector.registerAdapter(WordlineSaferpay);
|
|
193
|
-
//# sourceMappingURL=adapter.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { OrderPayment } from '@unchainedshop/core-orders';
|
|
2
|
-
import { TransactionCancelInput, TransactionCancelResponse } from '../models/TransactionCancel.
|
|
3
|
-
import { TransactionCaptureInput, TransactionCaptureResponse } from '../models/TransactionCapture.
|
|
4
|
-
import { PaymentPageAssertInput, PaymentPageAssertResponse } from '../models/PaymentPageAssert.
|
|
5
|
-
import { PaymentPageInitializeInput, PaymentPageInitializeResponse } from '../models/PaymentPageInitialize.
|
|
6
|
-
import { RequestHeader } from '../models/Request.
|
|
1
|
+
import type { OrderPayment } from '@unchainedshop/core-orders';
|
|
2
|
+
import type { TransactionCancelInput, TransactionCancelResponse } from '../models/TransactionCancel.ts';
|
|
3
|
+
import type { TransactionCaptureInput, TransactionCaptureResponse } from '../models/TransactionCapture.ts';
|
|
4
|
+
import type { PaymentPageAssertInput, PaymentPageAssertResponse } from '../models/PaymentPageAssert.ts';
|
|
5
|
+
import { type PaymentPageInitializeInput, type PaymentPageInitializeResponse } from '../models/PaymentPageInitialize.ts';
|
|
6
|
+
import type { RequestHeader } from '../models/Request.ts';
|
|
7
7
|
export declare class SaferpayClient {
|
|
8
8
|
private conn;
|
|
9
9
|
private customerId;
|
|
@@ -15,4 +15,3 @@ export declare class SaferpayClient {
|
|
|
15
15
|
transactionCancel(orderPayment: OrderPayment, input: Omit<TransactionCancelInput, 'RequestHeader'>): Promise<TransactionCancelResponse>;
|
|
16
16
|
transactionCapture(orderPayment: OrderPayment, input: Omit<TransactionCaptureInput, 'RequestHeader'>): Promise<TransactionCaptureResponse>;
|
|
17
17
|
}
|
|
18
|
-
//# sourceMappingURL=SaferpayClient.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {} from "../models/PaymentPageInitialize.js";
|
|
2
|
+
import { SaferpayConnection } from "./SaferpayConnection.js";
|
|
2
3
|
export class SaferpayClient {
|
|
3
4
|
conn;
|
|
4
5
|
customerId;
|
|
@@ -41,4 +42,3 @@ export class SaferpayClient {
|
|
|
41
42
|
});
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
|
-
//# sourceMappingURL=SaferpayClient.js.map
|