@colijnit/transactionapi 1.1.77 → 1.1.78
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/build/enum/ione-payment-status-code.enum.d.ts +12 -0
- package/build/enum/ione-payment-status-code.enum.js +16 -0
- package/build/enum/payment-method.enum.d.ts +3 -1
- package/build/enum/payment-method.enum.js +2 -0
- package/build/ione-api-transaction.d.ts +3 -1
- package/build/model/ione-payment-status.bo.d.ts +7 -0
- package/build/model/ione-payment-status.bo.js +7 -0
- package/build/model/psp-transaction-status.bo.d.ts +7 -0
- package/build/model/psp-transaction-status.bo.js +21 -0
- package/build/transaction-auth.d.ts +3 -1
- package/build/transaction-auth.js +34 -2
- package/build/transaction-public.d.ts +2 -0
- package/build/transaction-public.js +8 -0
- package/build/transaction.d.ts +3 -1
- package/build/transaction.js +8 -2
- package/build/transaction.unit.test.js +12 -2
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare enum IonePaymentStatusCode {
|
|
2
|
+
INIT = "INIT",
|
|
3
|
+
PENDING = "PENDING",
|
|
4
|
+
CANCELED = "CANCELED",
|
|
5
|
+
EXPIRED = "EXPIRED",
|
|
6
|
+
DENIED = "DENIED",
|
|
7
|
+
FAILURE = "FAILURE",
|
|
8
|
+
PARTIAL_PAYMENT = "PARTIAL_PAYMENT",
|
|
9
|
+
VERIFY = "VERIFY",
|
|
10
|
+
PAID = "PAID",
|
|
11
|
+
UNKNOWN = "UNKNOWN"
|
|
12
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IonePaymentStatusCode = void 0;
|
|
4
|
+
var IonePaymentStatusCode;
|
|
5
|
+
(function (IonePaymentStatusCode) {
|
|
6
|
+
IonePaymentStatusCode["INIT"] = "INIT";
|
|
7
|
+
IonePaymentStatusCode["PENDING"] = "PENDING";
|
|
8
|
+
IonePaymentStatusCode["CANCELED"] = "CANCELED";
|
|
9
|
+
IonePaymentStatusCode["EXPIRED"] = "EXPIRED";
|
|
10
|
+
IonePaymentStatusCode["DENIED"] = "DENIED";
|
|
11
|
+
IonePaymentStatusCode["FAILURE"] = "FAILURE";
|
|
12
|
+
IonePaymentStatusCode["PARTIAL_PAYMENT"] = "PARTIAL_PAYMENT";
|
|
13
|
+
IonePaymentStatusCode["VERIFY"] = "VERIFY";
|
|
14
|
+
IonePaymentStatusCode["PAID"] = "PAID";
|
|
15
|
+
IonePaymentStatusCode["UNKNOWN"] = "UNKNOWN";
|
|
16
|
+
})(IonePaymentStatusCode = exports.IonePaymentStatusCode || (exports.IonePaymentStatusCode = {}));
|
|
@@ -4,5 +4,7 @@ export declare enum PaymentMethod {
|
|
|
4
4
|
CreateIonePaymentLinkAndQRCode = "createIonePaymentLinkAndQRCode",
|
|
5
5
|
GetPaymentLinkStatus = "getPaymentLinkStatus",
|
|
6
6
|
GetDepositPaymentInfo = "getDepositPaymentInfo",
|
|
7
|
-
GetPaymentMethodsForSalesOrder = "getPaymentMethodsForSalesOrder"
|
|
7
|
+
GetPaymentMethodsForSalesOrder = "getPaymentMethodsForSalesOrder",
|
|
8
|
+
DoPinPayment = "doPinPayment",
|
|
9
|
+
GetPspTransactionStatus = "getPspTransactionStatus"
|
|
8
10
|
}
|
|
@@ -9,4 +9,6 @@ var PaymentMethod;
|
|
|
9
9
|
PaymentMethod["GetPaymentLinkStatus"] = "getPaymentLinkStatus";
|
|
10
10
|
PaymentMethod["GetDepositPaymentInfo"] = "getDepositPaymentInfo";
|
|
11
11
|
PaymentMethod["GetPaymentMethodsForSalesOrder"] = "getPaymentMethodsForSalesOrder";
|
|
12
|
+
PaymentMethod["DoPinPayment"] = "doPinPayment";
|
|
13
|
+
PaymentMethod["GetPspTransactionStatus"] = "getPspTransactionStatus";
|
|
12
14
|
})(PaymentMethod = exports.PaymentMethod || (exports.PaymentMethod = {}));
|
|
@@ -147,7 +147,7 @@ export declare abstract class IoneApiTransaction {
|
|
|
147
147
|
abstract getPaymentLinkStatus(paymentLinkUUID: string): Promise<DataServiceResponseData>;
|
|
148
148
|
abstract getDepositPaymentInfo(uuid: string): Promise<DataServiceResponseData>;
|
|
149
149
|
abstract getPaymentMethods(): Promise<DataServiceResponseData>;
|
|
150
|
-
abstract getPaymentMethodsForSalesOrder(): Promise<DataServiceResponseData>;
|
|
150
|
+
abstract getPaymentMethodsForSalesOrder(branchNr: string): Promise<DataServiceResponseData>;
|
|
151
151
|
abstract changeLineSequence(request: ChangeLineSequenceRequest): Promise<DataServiceResponseData>;
|
|
152
152
|
abstract changeLineQuantity(request: ChangeLineQuantityRequest): Promise<DataServiceResponseData>;
|
|
153
153
|
abstract changeLineCommissionCode(request: ChangeLineCommissionCodeRequest): Promise<DataServiceResponseData>;
|
|
@@ -196,6 +196,8 @@ export declare abstract class IoneApiTransaction {
|
|
|
196
196
|
abstract receiveGoodsForPurchaseOrderCorrection(request: ReceiveGoodsForPurchaseOrderCorrectionRequest): Promise<DataServiceResponseData>;
|
|
197
197
|
abstract getPurchasePortalLines(purchasePortalLine: GetPurchasePortalLine): Promise<DataServiceResponseData>;
|
|
198
198
|
abstract getPurchaseOrderConfirmation(purchaseOrderConfirmation: GetPurchaseOrderConfirmation): Promise<DataServiceResponseData>;
|
|
199
|
+
abstract doPinPayment(transId: number, paymentMethodCode: string, cashRegisterNr: number, cashRegisterGroupId: number, amount: number): Promise<DataServiceResponseData>;
|
|
200
|
+
abstract getPspTransactionStatus(pspTransactionUuid: string): Promise<DataServiceResponseData>;
|
|
199
201
|
abstract updatePurchasePortalLines(request: PurchasePortalLine): Promise<DataServiceResponseData>;
|
|
200
202
|
abstract lockTransactionByTransId(transId: number, transactionVersion: number): Promise<DataServiceResponseData>;
|
|
201
203
|
abstract generateCommissionOrders(transId: number, onlyGenerateForDirectSellSuppliers: boolean): Promise<DataServiceResponseData>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BusinessObject } from '@colijnit/ioneconnector/build/model/business-object';
|
|
2
|
+
import { IonePaymentStatusCode } from '../enum/ione-payment-status-code.enum';
|
|
3
|
+
export declare class IonePaymentStatus extends BusinessObject {
|
|
4
|
+
code: IonePaymentStatusCode;
|
|
5
|
+
endStatus: boolean;
|
|
6
|
+
description: string;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IonePaymentStatus = void 0;
|
|
4
|
+
const business_object_1 = require("@colijnit/ioneconnector/build/model/business-object");
|
|
5
|
+
class IonePaymentStatus extends business_object_1.BusinessObject {
|
|
6
|
+
}
|
|
7
|
+
exports.IonePaymentStatus = IonePaymentStatus;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BusinessObject } from '@colijnit/ioneconnector/build/model/business-object';
|
|
2
|
+
import { IonePaymentStatus } from './ione-payment-status.bo';
|
|
3
|
+
export declare class PspTransactionStatus extends BusinessObject {
|
|
4
|
+
id: number;
|
|
5
|
+
statusDate: Date;
|
|
6
|
+
status: IonePaymentStatus;
|
|
7
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.PspTransactionStatus = void 0;
|
|
13
|
+
const business_object_1 = require("@colijnit/ioneconnector/build/model/business-object");
|
|
14
|
+
const date_field_decorator_1 = require("@colijnit/ioneconnector/build/factory/decorators/date-field.decorator");
|
|
15
|
+
class PspTransactionStatus extends business_object_1.BusinessObject {
|
|
16
|
+
}
|
|
17
|
+
__decorate([
|
|
18
|
+
date_field_decorator_1.DateField(),
|
|
19
|
+
__metadata("design:type", Date)
|
|
20
|
+
], PspTransactionStatus.prototype, "statusDate", void 0);
|
|
21
|
+
exports.PspTransactionStatus = PspTransactionStatus;
|
|
@@ -183,12 +183,14 @@ export declare class TransactionAuth extends IoneApiTransaction {
|
|
|
183
183
|
getPaymentLinkStatus(paymentLinkUUID: string): Promise<DataServiceResponseData>;
|
|
184
184
|
getDepositPaymentInfo(uuid: string): Promise<DataServiceResponseData>;
|
|
185
185
|
getPaymentMethods(): Promise<DataServiceResponseData>;
|
|
186
|
-
getPaymentMethodsForSalesOrder(): Promise<DataServiceResponseData>;
|
|
186
|
+
getPaymentMethodsForSalesOrder(branchNr?: string): Promise<DataServiceResponseData>;
|
|
187
187
|
getGoodsReceiptHistory(transId: number, lineNr: number): Promise<DataServiceResponseData>;
|
|
188
188
|
receiveGoodsForPurchaseOrder(request: ReceiveGoodsForPurchaseOrderRequest): Promise<DataServiceResponseData>;
|
|
189
189
|
receiveGoodsForPurchaseOrderCorrection(request: ReceiveGoodsForPurchaseOrderCorrectionRequest): Promise<DataServiceResponseData>;
|
|
190
190
|
getPurchasePortalLines(purchasePortalLine: GetPurchasePortalLine): Promise<DataServiceResponseData>;
|
|
191
191
|
getPurchaseOrderConfirmation(purchaseOrderConfirmation: GetPurchaseOrderConfirmation): Promise<DataServiceResponseData>;
|
|
192
|
+
doPinPayment(transId: number, paymentMethodCode: string, cashRegisterNr: number, cashRegisterGroupId: number, amount: number): Promise<DataServiceResponseData>;
|
|
193
|
+
getPspTransactionStatus(pspTransactionUuid: string): Promise<DataServiceResponseData>;
|
|
192
194
|
updatePurchasePortalLines(purchasePortalLine: PurchasePortalLine): Promise<DataServiceResponseData>;
|
|
193
195
|
lockTransactionByTransId(transId: number, transactionVersion: number): Promise<DataServiceResponseData>;
|
|
194
196
|
generateCommissionOrders(transId: number, onlyGenerateForDirectSellSuppliers: boolean): Promise<DataServiceResponseData>;
|
|
@@ -908,11 +908,15 @@ class TransactionAuth extends ione_api_transaction_1.IoneApiTransaction {
|
|
|
908
908
|
getPaymentMethods() {
|
|
909
909
|
return this.selectMultiple(module_name_enum_1.ModuleName.MasterData, master_data_object_name_enum_1.MasterDataObjectName.PaymentMethod);
|
|
910
910
|
}
|
|
911
|
-
getPaymentMethodsForSalesOrder() {
|
|
911
|
+
getPaymentMethodsForSalesOrder(branchNr) {
|
|
912
|
+
let params = {};
|
|
913
|
+
if (branchNr) {
|
|
914
|
+
params.branchNr = branchNr;
|
|
915
|
+
}
|
|
912
916
|
const data = {
|
|
913
917
|
moduleName: module_name_enum_1.ModuleName.MasterData,
|
|
914
918
|
methodName: payment_method_enum_1.PaymentMethod.GetPaymentMethodsForSalesOrder,
|
|
915
|
-
parameterValues:
|
|
919
|
+
parameterValues: params,
|
|
916
920
|
refCursorAsArray: true
|
|
917
921
|
};
|
|
918
922
|
return this._call(data_service_method_enum_1.DataServiceMethod.ExecuteMethod, data);
|
|
@@ -979,6 +983,34 @@ class TransactionAuth extends ione_api_transaction_1.IoneApiTransaction {
|
|
|
979
983
|
};
|
|
980
984
|
return this._call(data_service_method_enum_1.DataServiceMethod.ExecuteMethod, data);
|
|
981
985
|
}
|
|
986
|
+
async doPinPayment(transId, paymentMethodCode, cashRegisterNr, cashRegisterGroupId, amount) {
|
|
987
|
+
const params = {
|
|
988
|
+
transId: transId,
|
|
989
|
+
paymentMethodCode: paymentMethodCode,
|
|
990
|
+
cashRegisterNr: cashRegisterNr,
|
|
991
|
+
cashRegisterGroupId: cashRegisterGroupId,
|
|
992
|
+
amount: amount
|
|
993
|
+
};
|
|
994
|
+
const data = {
|
|
995
|
+
moduleName: module_name_enum_1.ModuleName.Accounting,
|
|
996
|
+
methodName: payment_method_enum_1.PaymentMethod.DoPinPayment,
|
|
997
|
+
parameterValues: params,
|
|
998
|
+
refCursorAsArray: true
|
|
999
|
+
};
|
|
1000
|
+
return this._call(data_service_method_enum_1.DataServiceMethod.ExecuteMethod, data);
|
|
1001
|
+
}
|
|
1002
|
+
async getPspTransactionStatus(pspTransactionUuid) {
|
|
1003
|
+
const params = {
|
|
1004
|
+
pspTransactionUuid: pspTransactionUuid
|
|
1005
|
+
};
|
|
1006
|
+
const data = {
|
|
1007
|
+
moduleName: module_name_enum_1.ModuleName.Accounting,
|
|
1008
|
+
methodName: payment_method_enum_1.PaymentMethod.GetPspTransactionStatus,
|
|
1009
|
+
parameterValues: params,
|
|
1010
|
+
refCursorAsArray: true
|
|
1011
|
+
};
|
|
1012
|
+
return this._call(data_service_method_enum_1.DataServiceMethod.ExecuteMethod, data);
|
|
1013
|
+
}
|
|
982
1014
|
updatePurchasePortalLines(purchasePortalLine) {
|
|
983
1015
|
const data = {
|
|
984
1016
|
moduleName: module_name_enum_1.ModuleName.PurchasePortal,
|
|
@@ -190,6 +190,8 @@ export declare class TransactionPublic extends IoneApiTransaction {
|
|
|
190
190
|
receiveGoodsForPurchaseOrderCorrection(request: ReceiveGoodsForPurchaseOrderCorrectionRequest): Promise<DataServiceResponseData>;
|
|
191
191
|
getPurchasePortalLines(purchaseOrderLine: GetPurchasePortalLine): Promise<DataServiceResponseData>;
|
|
192
192
|
getPurchaseOrderConfirmation(purchaseOrderConfirmation: GetPurchaseOrderConfirmation): Promise<DataServiceResponseData>;
|
|
193
|
+
doPinPayment(transId: number, paymentMethodCode: string, cashRegisterNr: number, cashRegisterGroupId: number, amount: number): Promise<DataServiceResponseData>;
|
|
194
|
+
getPspTransactionStatus(pspTransactionUuid: string): Promise<DataServiceResponseData>;
|
|
193
195
|
updatePurchasePortalLines(request: PurchasePortalLine): Promise<DataServiceResponseData>;
|
|
194
196
|
lockTransactionByTransId(transId: number, transactionVersion: number): Promise<DataServiceResponseData>;
|
|
195
197
|
generateCommissionOrders(transId: number, onlyGenerateForDirectSellSuppliers: boolean): Promise<DataServiceResponseData>;
|
|
@@ -533,6 +533,14 @@ class TransactionPublic extends ione_api_transaction_1.IoneApiTransaction {
|
|
|
533
533
|
async getPurchaseOrderConfirmation(purchaseOrderConfirmation) {
|
|
534
534
|
return null;
|
|
535
535
|
}
|
|
536
|
+
async doPinPayment(transId, paymentMethodCode, cashRegisterNr, cashRegisterGroupId, amount) {
|
|
537
|
+
console.warn('doPinPayment not implemented');
|
|
538
|
+
return Promise.resolve(new data_service_response_data_1.DataServiceResponseData());
|
|
539
|
+
}
|
|
540
|
+
async getPspTransactionStatus(pspTransactionUuid) {
|
|
541
|
+
console.warn('getPspTransactionStatus not implemented');
|
|
542
|
+
return Promise.resolve(new data_service_response_data_1.DataServiceResponseData());
|
|
543
|
+
}
|
|
536
544
|
updatePurchasePortalLines(request) {
|
|
537
545
|
return null;
|
|
538
546
|
}
|
package/build/transaction.d.ts
CHANGED
|
@@ -208,9 +208,11 @@ export declare class Transaction {
|
|
|
208
208
|
createIonePaymentLinkAndQRCode(request: CreatePaymentLinkRequest): Promise<DataServiceResponseData>;
|
|
209
209
|
getPaymentLinkStatus(paymentLinkUUID: string): Promise<DataServiceResponseData>;
|
|
210
210
|
getPaymentMethods(): Promise<DataServiceResponseData>;
|
|
211
|
-
getPaymentMethodsForSalesOrder(): Promise<DataServiceResponseData>;
|
|
211
|
+
getPaymentMethodsForSalesOrder(branchNr?: string): Promise<DataServiceResponseData>;
|
|
212
212
|
getPurchasePortalLines(purchasePortalLine: GetPurchasePortalLine): Promise<DataServiceResponseData>;
|
|
213
213
|
getPurchaseOrderConfirmation(purchaseOrderConfirmation: GetPurchaseOrderConfirmation): Promise<DataServiceResponseData>;
|
|
214
|
+
doPinPayment(transId: number, paymentMethodCode: string, cashRegisterNr: number, cashRegisterGroupId: number, amount: number): Promise<DataServiceResponseData>;
|
|
215
|
+
getPspTransactionStatus(pspTransactionUuid: string): Promise<DataServiceResponseData>;
|
|
214
216
|
updatePurchasePortalLines(request: PurchasePortalLine): Promise<DataServiceResponseData>;
|
|
215
217
|
lockTransactionByTransId(transId: number, transactionVersion: number): Promise<DataServiceResponseData>;
|
|
216
218
|
generateCommissionOrders(transId: number, onlyGenerateForDirectSellSuppliers: boolean): Promise<DataServiceResponseData>;
|
package/build/transaction.js
CHANGED
|
@@ -355,8 +355,8 @@ class Transaction {
|
|
|
355
355
|
getPaymentMethods() {
|
|
356
356
|
return this.transaction.getPaymentMethods();
|
|
357
357
|
}
|
|
358
|
-
getPaymentMethodsForSalesOrder() {
|
|
359
|
-
return this.transaction.getPaymentMethodsForSalesOrder();
|
|
358
|
+
getPaymentMethodsForSalesOrder(branchNr) {
|
|
359
|
+
return this.transaction.getPaymentMethodsForSalesOrder(branchNr);
|
|
360
360
|
}
|
|
361
361
|
async getPurchasePortalLines(purchasePortalLine) {
|
|
362
362
|
return this.transaction.getPurchasePortalLines(purchasePortalLine);
|
|
@@ -364,6 +364,12 @@ class Transaction {
|
|
|
364
364
|
async getPurchaseOrderConfirmation(purchaseOrderConfirmation) {
|
|
365
365
|
return this.transaction.getPurchaseOrderConfirmation(purchaseOrderConfirmation);
|
|
366
366
|
}
|
|
367
|
+
async doPinPayment(transId, paymentMethodCode, cashRegisterNr, cashRegisterGroupId, amount) {
|
|
368
|
+
return this.transaction.doPinPayment(transId, paymentMethodCode, cashRegisterNr, cashRegisterGroupId, amount);
|
|
369
|
+
}
|
|
370
|
+
async getPspTransactionStatus(pspTransactionUuid) {
|
|
371
|
+
return this.transaction.getPspTransactionStatus(pspTransactionUuid);
|
|
372
|
+
}
|
|
367
373
|
async updatePurchasePortalLines(request) {
|
|
368
374
|
return this.transaction.updatePurchasePortalLines(request);
|
|
369
375
|
}
|
|
@@ -37,7 +37,7 @@ const remoteOptions = {
|
|
|
37
37
|
password: "patrick"
|
|
38
38
|
};
|
|
39
39
|
const developRemoteOptions = {
|
|
40
|
-
url: "http://130.62.
|
|
40
|
+
url: "http://130.62.6.139:8080/ione/",
|
|
41
41
|
ajaxUrl: "http://130.62.7.55:8888/ione/",
|
|
42
42
|
schema: "815",
|
|
43
43
|
version: "252",
|
|
@@ -229,7 +229,8 @@ describe("TransactionAPI", () => {
|
|
|
229
229
|
expect(result.resultObjects.length).toBeGreaterThan(0);
|
|
230
230
|
});
|
|
231
231
|
it('getPaymentMethodsForSalesOrder', async () => {
|
|
232
|
-
const
|
|
232
|
+
const branchNr = "1";
|
|
233
|
+
const result = await transaction.getPaymentMethodsForSalesOrder(branchNr);
|
|
233
234
|
expect(result.resultObjects.length).toBeGreaterThan(0);
|
|
234
235
|
});
|
|
235
236
|
it('getDepositPaymentInfo', async () => {
|
|
@@ -376,4 +377,13 @@ describe("TransactionAPI", () => {
|
|
|
376
377
|
const result = await transaction.getTransVatCodes(transType, refDate);
|
|
377
378
|
expect(result).toBeDefined();
|
|
378
379
|
});
|
|
380
|
+
it('doPinPayment', async () => {
|
|
381
|
+
const transId = 113646;
|
|
382
|
+
const paymentMethodCode = "56";
|
|
383
|
+
const cashRegisterNr = 1;
|
|
384
|
+
const cashRegisterGroupId = 1;
|
|
385
|
+
const amount = 0.01;
|
|
386
|
+
const result = await transaction.doPinPayment(transId, paymentMethodCode, cashRegisterNr, cashRegisterGroupId, amount);
|
|
387
|
+
expect(result).toBeDefined();
|
|
388
|
+
});
|
|
379
389
|
});
|