UNPKG

expresscheckout-nodejs

Version:

Juspay's official expresscheckout-nodejs sdk

45 lines 1.97 kB
var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); import JuspayResource from '../JuspayResource.js'; var OrderSession = /** @class */ (function (_super) { __extends(OrderSession, _super); function OrderSession(juspayEnvironment) { return _super.call(this, juspayEnvironment) || this; } /** * 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 */ OrderSession.prototype.create = function (body, juspayConfig) { return this.makeServiceCall({ method: 'POST', path: '/session', body: body, headers: { 'Content-Type': 'application/json' }, juspayOverrideConfig: juspayConfig, auth: ['JWE'] }); }; return OrderSession; }(JuspayResource)); export default OrderSession; //# sourceMappingURL=OrderSession.js.map