@figuredev/payments-sdk
Advanced tools
Comparing version 0.26.18 to 0.26.19
@@ -22,7 +22,7 @@ "use strict"; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield http_1.createHttpRequest({ | ||
return yield (0, http_1.createHttpRequest)({ | ||
baseURL: this.config.baseUrl, | ||
method: "POST", | ||
url: `/payment/${id}`, | ||
headers: utils_1.constructHeaders(this.config.secret, ctx), | ||
headers: (0, utils_1.constructHeaders)(this.config.secret, ctx), | ||
data: Object.assign(Object.assign({}, data), { command: types_1.PaymentCommandDTO.Sale }), | ||
@@ -34,7 +34,7 @@ }).then((r) => r.data); | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield http_1.createHttpRequest({ | ||
return yield (0, http_1.createHttpRequest)({ | ||
baseURL: this.config.baseUrl, | ||
method: "POST", | ||
url: `/payment/${id}`, | ||
headers: utils_1.constructHeaders(this.config.secret, ctx), | ||
headers: (0, utils_1.constructHeaders)(this.config.secret, ctx), | ||
data: Object.assign(Object.assign({}, data), { command: types_1.PaymentCommandDTO.Auth }), | ||
@@ -47,7 +47,7 @@ }).then((r) => r.data); | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield http_1.createHttpRequest({ | ||
return yield (0, http_1.createHttpRequest)({ | ||
baseURL: this.config.baseUrl, | ||
method: "POST", | ||
url: `/payment/${id}`, | ||
headers: utils_1.constructHeaders(this.config.secret, ctx), | ||
headers: (0, utils_1.constructHeaders)(this.config.secret, ctx), | ||
data: { | ||
@@ -64,7 +64,7 @@ command: types_1.PaymentCommandDTO.TipAdjust, | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield http_1.createHttpRequest({ | ||
return yield (0, http_1.createHttpRequest)({ | ||
baseURL: this.config.baseUrl, | ||
method: "POST", | ||
url: `/payment/${id}`, | ||
headers: utils_1.constructHeaders(this.config.secret, ctx), | ||
headers: (0, utils_1.constructHeaders)(this.config.secret, ctx), | ||
data: { | ||
@@ -81,7 +81,7 @@ command: types_1.PaymentCommandDTO.Refund, | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield http_1.createHttpRequest({ | ||
return yield (0, http_1.createHttpRequest)({ | ||
baseURL: this.config.baseUrl, | ||
method: "POST", | ||
url: `/payment/${id}`, | ||
headers: utils_1.constructHeaders(this.config.secret, ctx), | ||
headers: (0, utils_1.constructHeaders)(this.config.secret, ctx), | ||
data: { | ||
@@ -97,7 +97,7 @@ command: types_1.PaymentCommandDTO.Capture, | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield http_1.createHttpRequest({ | ||
return yield (0, http_1.createHttpRequest)({ | ||
baseURL: this.config.baseUrl, | ||
method: "POST", | ||
url: `/payment/${id}`, | ||
headers: utils_1.constructHeaders(this.config.secret, ctx), | ||
headers: (0, utils_1.constructHeaders)(this.config.secret, ctx), | ||
data: { | ||
@@ -112,7 +112,7 @@ command: types_1.PaymentCommandDTO.Void, | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield http_1.createHttpRequest({ | ||
return yield (0, http_1.createHttpRequest)({ | ||
baseURL: this.config.baseUrl, | ||
method: "POST", | ||
url: `/payment/${id}`, | ||
headers: utils_1.constructHeaders(this.config.secret, ctx), | ||
headers: (0, utils_1.constructHeaders)(this.config.secret, ctx), | ||
data: { | ||
@@ -128,7 +128,7 @@ command: types_1.PaymentCommandDTO.Tokenize, | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield http_1.createHttpRequest({ | ||
return yield (0, http_1.createHttpRequest)({ | ||
baseURL: this.config.baseUrl, | ||
method: "POST", | ||
url: `/payment/${id}/cancel`, | ||
headers: utils_1.constructHeaders(this.config.secret, ctx), | ||
headers: (0, utils_1.constructHeaders)(this.config.secret, ctx), | ||
data: { | ||
@@ -142,7 +142,7 @@ referenceId: referenceId, | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield http_1.createHttpRequest({ | ||
return yield (0, http_1.createHttpRequest)({ | ||
baseURL: this.config.baseUrl, | ||
method: "POST", | ||
url: `/payment/${id}/save`, | ||
headers: utils_1.constructHeaders(this.config.secret, ctx), | ||
headers: (0, utils_1.constructHeaders)(this.config.secret, ctx), | ||
data: data, | ||
@@ -154,7 +154,7 @@ }).then((r) => r.data); | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield http_1.createHttpRequest({ | ||
return yield (0, http_1.createHttpRequest)({ | ||
baseURL: this.config.baseUrl, | ||
method: "GET", | ||
url: `/payment/${id}`, | ||
headers: utils_1.constructHeaders(this.config.secret, ctx), | ||
headers: (0, utils_1.constructHeaders)(this.config.secret, ctx), | ||
timeout: 15000, | ||
@@ -166,7 +166,7 @@ }).then((r) => r.data); | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield http_1.createHttpRequest({ | ||
return yield (0, http_1.createHttpRequest)({ | ||
baseURL: this.config.baseUrl, | ||
method: "GET", | ||
url: `/payment-audit/${id}`, | ||
headers: utils_1.constructHeaders(this.config.secret, ctx), | ||
headers: (0, utils_1.constructHeaders)(this.config.secret, ctx), | ||
}).then((r) => r.data); | ||
@@ -177,7 +177,7 @@ }); | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return yield http_1.createHttpRequest({ | ||
return yield (0, http_1.createHttpRequest)({ | ||
baseURL: this.config.baseUrl, | ||
method: "POST", | ||
url: `/auth-token`, | ||
headers: utils_1.constructHeaders(this.config.secret, ctx), | ||
headers: (0, utils_1.constructHeaders)(this.config.secret, ctx), | ||
data: Object.assign(Object.assign({ gateway: gateway }, (amount == null ? null : { amount: amount })), (type == null ? null : { type: type })), | ||
@@ -184,0 +184,0 @@ }).then((r) => r.data); |
@@ -1,2 +0,2 @@ | ||
import { Maybe } from "@figurepos/fgr-lib-backend/lib/types"; | ||
import { IsoDateTime, Maybe } from "@figurepos/fgr-lib-backend/lib/types"; | ||
export declare type PaymentInputDTO = { | ||
@@ -116,5 +116,12 @@ token?: string; | ||
status: PaymentResponseStatusDTO; | ||
rootPaymentId: string; | ||
timestamp: IsoDateTime; | ||
serviceId: string; | ||
amountRequested?: number; | ||
amountAuthorized?: number; | ||
tipAmountRequested?: number; | ||
tipAuthorized?: number; | ||
gatewayRefId?: string; | ||
authCode?: string; | ||
currency?: Maybe<string>; | ||
card?: Maybe<PaymentResponseCardDataDTO>; | ||
@@ -138,3 +145,4 @@ declineCode?: Maybe<string>; | ||
Dejavoo = "Dejavoo", | ||
TSYS = "TSYS" | ||
TSYS = "TSYS", | ||
Pax = "Pax" | ||
} | ||
@@ -168,3 +176,4 @@ export declare type PaymentResponseCardDataDTO = { | ||
Contactless = "contactless", | ||
ApplePay = "apple-pay" | ||
ApplePay = "apple-pay", | ||
Other = "other" | ||
} | ||
@@ -179,3 +188,4 @@ export declare enum PaymentCardIssuerDTO { | ||
UnionPay = "UnionPay", | ||
Diners = "Diners" | ||
Diners = "Diners", | ||
Other = "Other" | ||
} | ||
@@ -182,0 +192,0 @@ export declare type PaymentSaveCardDataDTO = { |
@@ -75,2 +75,3 @@ "use strict"; | ||
PaymentResponseGatewayDTO["TSYS"] = "TSYS"; | ||
PaymentResponseGatewayDTO["Pax"] = "Pax"; | ||
})(PaymentResponseGatewayDTO = exports.PaymentResponseGatewayDTO || (exports.PaymentResponseGatewayDTO = {})); | ||
@@ -96,2 +97,3 @@ var PaymentResponseCommandDTO; | ||
PaymentEntryMethodDTO["ApplePay"] = "apple-pay"; | ||
PaymentEntryMethodDTO["Other"] = "other"; | ||
})(PaymentEntryMethodDTO = exports.PaymentEntryMethodDTO || (exports.PaymentEntryMethodDTO = {})); | ||
@@ -108,2 +110,3 @@ var PaymentCardIssuerDTO; | ||
PaymentCardIssuerDTO["Diners"] = "Diners"; | ||
PaymentCardIssuerDTO["Other"] = "Other"; | ||
})(PaymentCardIssuerDTO = exports.PaymentCardIssuerDTO || (exports.PaymentCardIssuerDTO = {})); | ||
@@ -110,0 +113,0 @@ // auth token type |
{ | ||
"name": "@figuredev/payments-sdk", | ||
"version": "0.26.18", | ||
"version": "0.26.19", | ||
"license": "ISC", | ||
@@ -13,3 +13,3 @@ "files": [ | ||
"devDependencies": { | ||
"typescript": "^4.3.5" | ||
"typescript": "4.7.4" | ||
}, | ||
@@ -16,0 +16,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33371
568
1