UNPKG

expresscheckout-nodejs

Version:

Juspay's official expresscheckout-nodejs sdk

43 lines 2.09 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const JuspayResource_js_1 = __importDefault(require("../JuspayResource.js")); class Payments extends JuspayResource_js_1.default { constructor(juspayEnvironment) { super(juspayEnvironment); } /** * initiate payment for the order id, for merchants * @param body order_id * @param juspayConfig override config using this params usage:- {apiKey: '', merchantId: '', ...} * @returns Promise Response Object * * @note * If you are a PCI compliant merchant, you can combine Create Order API request with Payments API request in a single API request. * Add order details as below:- * @example 'order.order_id', 'order.amount' * * @link * - card:- https://docs.juspay.in/api-reference/docs/express-checkout/credit--debit-card-transaction * - netbanking:- https://docs.juspay.in/api-reference/docs/express-checkout/netbanking-payment * - wallet:- https://docs.juspay.in/api-reference/docs/express-checkout/wallet-payment * - wallet direct debit:- https://docs.juspay.in/api-reference/docs/express-checkout/wallet-direct-debit * - upi collect:- https://docs.juspay.in/api-reference/docs/express-checkout/upi-collect-payment * - upi intent:- https://docs.juspay.in/api-reference/docs/express-checkout/upi-intent-payment * - consumer finance:- https://docs.juspay.in/api-reference/docs/express-checkout/consumer-finance-payment */ create(body, juspayConfig) { body = Object.assign(Object.assign({}, body), { merchant_id: this.juspayEnvironment.getMerchantId(), format: 'json' }); return this.makeServiceCall({ method: 'POST', path: '/txns', body: body, juspayOverrideConfig: juspayConfig, auth: ['JWE'], }); } } exports.default = Payments; //# sourceMappingURL=Payments.js.map