UNPKG

expresscheckout-nodejs

Version:

Juspay's official expresscheckout-nodejs sdk

33 lines 1.3 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 OrderSession extends JuspayResource_js_1.default { constructor(juspayEnvironment) { super(juspayEnvironment); } /** * This is a Server-to-Server API that takes order parameters as an input and returns the SDK payload and the payment link. This also creates order in the Juspay system. * @param body order session body * @param juspayConfig override config using this params usage:- {apiKey: '', merchantId: '', ...} * @returns Promise Response Object * * @link https://docs.juspay.in/hyper-checkout/android/base-sdk-integration/session */ create(body, juspayConfig) { return this.makeServiceCall({ method: 'POST', path: '/session', body, headers: { 'Content-Type': 'application/json', }, juspayOverrideConfig: juspayConfig, auth: ['JWE'], }); } } exports.default = OrderSession; //# sourceMappingURL=OrderSession.js.map