@aptos-scp/scp-component-rn-device-services 0.0.1

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.
Files changed (82) hide show
  1. package/LICENSE.md +1 -0
  2. package/README.md +57 -0
  3. package/constants/package.json +7 -0
  4. package/interfaces/package.json +7 -0
  5. package/ios/AurusEnterpriseSDK.framework/AurusEnterpriseSDK +0 -0
  6. package/ios/AurusEnterpriseSDK.framework/Headers/AurusEnterpriseSDK.h +96 -0
  7. package/ios/SCPRNDeviceServices/AdyenPaymentTerminal.h +18 -0
  8. package/ios/SCPRNDeviceServices/AdyenPaymentTerminal.m +63 -0
  9. package/ios/SCPRNDeviceServices/AurusPaymentTerminal.h +19 -0
  10. package/ios/SCPRNDeviceServices/AurusPaymentTerminal.m +72 -0
  11. package/ios/SCPRNDeviceServices/VendorPaymentTerminal.h +24 -0
  12. package/ios/SCPRNDeviceServices/VendorPaymentTerminal.m +58 -0
  13. package/ios/SCPRNDeviceServices.xcodeproj/project.pbxproj +551 -0
  14. package/lib/AurusDevice/AurusPaymentDevice.d.ts +77 -0
  15. package/lib/AurusDevice/AurusPaymentDevice.js +473 -0
  16. package/lib/AurusDevice/AurusPaymentDevice.js.map +1 -0
  17. package/lib/AurusDevice/constants.d.ts +89 -0
  18. package/lib/AurusDevice/constants.js +94 -0
  19. package/lib/AurusDevice/constants.js.map +1 -0
  20. package/lib/AurusDevice/index.d.ts +2 -0
  21. package/lib/AurusDevice/index.js +8 -0
  22. package/lib/AurusDevice/index.js.map +1 -0
  23. package/lib/AurusDevice/sdk-interface/AESDKRegistration.d.ts +43 -0
  24. package/lib/AurusDevice/sdk-interface/AESDKRegistration.js +9 -0
  25. package/lib/AurusDevice/sdk-interface/AESDKRegistration.js.map +1 -0
  26. package/lib/AurusDevice/sdk-interface/AurusPaymentSupport.d.ts +40 -0
  27. package/lib/AurusDevice/sdk-interface/AurusPaymentSupport.js +307 -0
  28. package/lib/AurusDevice/sdk-interface/AurusPaymentSupport.js.map +1 -0
  29. package/lib/AurusDevice/sdk-interface/CancelTransaction.d.ts +49 -0
  30. package/lib/AurusDevice/sdk-interface/CancelTransaction.js +9 -0
  31. package/lib/AurusDevice/sdk-interface/CancelTransaction.js.map +1 -0
  32. package/lib/AurusDevice/sdk-interface/GetCardBinRequest.d.ts +35 -0
  33. package/lib/AurusDevice/sdk-interface/GetCardBinRequest.js +9 -0
  34. package/lib/AurusDevice/sdk-interface/GetCardBinRequest.js.map +1 -0
  35. package/lib/AurusDevice/sdk-interface/PLCCApplication.d.ts +64 -0
  36. package/lib/AurusDevice/sdk-interface/PLCCApplication.js +9 -0
  37. package/lib/AurusDevice/sdk-interface/PLCCApplication.js.map +1 -0
  38. package/lib/AurusDevice/sdk-interface/TransactionRequest.d.ts +159 -0
  39. package/lib/AurusDevice/sdk-interface/TransactionRequest.js +9 -0
  40. package/lib/AurusDevice/sdk-interface/TransactionRequest.js.map +1 -0
  41. package/lib/AurusDevice/sdk-interface/index.d.ts +6 -0
  42. package/lib/AurusDevice/sdk-interface/index.js +7 -0
  43. package/lib/AurusDevice/sdk-interface/index.js.map +1 -0
  44. package/lib/PaymentDeviceFactory.d.ts +11 -0
  45. package/lib/PaymentDeviceFactory.js +33 -0
  46. package/lib/PaymentDeviceFactory.js.map +1 -0
  47. package/lib/PaymentDeviceService.d.ts +19 -0
  48. package/lib/PaymentDeviceService.js +129 -0
  49. package/lib/PaymentDeviceService.js.map +1 -0
  50. package/lib/constants/constants.d.ts +52 -0
  51. package/lib/constants/constants.js +64 -0
  52. package/lib/constants/constants.js.map +1 -0
  53. package/lib/constants/index.d.ts +1 -0
  54. package/lib/constants/index.js +7 -0
  55. package/lib/constants/index.js.map +1 -0
  56. package/lib/index.d.ts +3 -0
  57. package/lib/index.js +8 -0
  58. package/lib/index.js.map +1 -0
  59. package/lib/interfaces/IDeviceStatus.d.ts +7 -0
  60. package/lib/interfaces/IDeviceStatus.js +4 -0
  61. package/lib/interfaces/IDeviceStatus.js.map +1 -0
  62. package/lib/interfaces/index.d.ts +2 -0
  63. package/lib/interfaces/index.js +3 -0
  64. package/lib/interfaces/index.js.map +1 -0
  65. package/lib/interfaces/payment/IPayment.d.ts +25 -0
  66. package/lib/interfaces/payment/IPayment.js +3 -0
  67. package/lib/interfaces/payment/IPayment.js.map +1 -0
  68. package/lib/interfaces/payment/index.d.ts +2 -0
  69. package/lib/interfaces/payment/index.js +3 -0
  70. package/lib/interfaces/payment/index.js.map +1 -0
  71. package/lib/interfaces/payment/messages/index.d.ts +2 -0
  72. package/lib/interfaces/payment/messages/index.js +3 -0
  73. package/lib/interfaces/payment/messages/index.js.map +1 -0
  74. package/lib/interfaces/payment/messages/requests.d.ts +47 -0
  75. package/lib/interfaces/payment/messages/requests.js +3 -0
  76. package/lib/interfaces/payment/messages/requests.js.map +1 -0
  77. package/lib/interfaces/payment/messages/responses.d.ts +57 -0
  78. package/lib/interfaces/payment/messages/responses.js +3 -0
  79. package/lib/interfaces/payment/messages/responses.js.map +1 -0
  80. package/package.json +84 -0
  81. package/types/money-works/index.d.ts +49 -0
  82. package/types/react-native-xml2js/index.d.ts +6 -0
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const constants_1 = require("../constants/constants");
4
+ exports.TransactionTypes = {
5
+ //Aurus Transaction Types
6
+ SALE: "01",
7
+ RETURN: "02",
8
+ VALUE_INQUIRY: "12",
9
+ VALUE_REDEEM: "18",
10
+ VALUE_ISSUE: "11",
11
+ VOID: "06",
12
+ VOID_RETURN: "03"
13
+ };
14
+ exports.EntryMode = {
15
+ INSERT: "I",
16
+ MANUAL: "M",
17
+ SCAN: "B",
18
+ SWIPE: "S"
19
+ };
20
+ exports.AurusResponseCode = {
21
+ APPROVED: "00000"
22
+ };
23
+ exports.RequestTypes = {
24
+ CancelTransaction: "CancelTranRequest",
25
+ GetCardBin: "GetCardBinRequest",
26
+ Registration: "AESDKRegistrationRequest",
27
+ Transaction: "TransRequest"
28
+ };
29
+ exports.InitializationResponses = {
30
+ DeviceAlreadyConfigured: "DEVICE_ALREADY_CONFIGURED",
31
+ DeviceConfigurationComplete: "EMV_CONFIGURATION_COMPLETED",
32
+ DeviceNotRegistered: "DEVICE NOT REGISTERED",
33
+ EmvStarted: "EMV_CONFIGURATION_STARTED"
34
+ };
35
+ exports.AesdkResponseTypes = {
36
+ AESDK: "AESDKResponse",
37
+ CancelTransaction: "CancelTransactionResponse",
38
+ GetCardBin: "GetCardBINResponse",
39
+ Registration: "AESDKRegistrationResponse",
40
+ Transaction: "TransResponse"
41
+ };
42
+ exports.ResponseValues = {
43
+ Approved: "00000",
44
+ Timeout: "56033"
45
+ };
46
+ exports.cardTypeMap = {
47
+ "VI": constants_1.CardType.Visa,
48
+ "VIC": constants_1.CardType.Visa,
49
+ "VID": constants_1.CardType.Visa,
50
+ "MC": constants_1.CardType.MasterCard,
51
+ "MCC": constants_1.CardType.MasterCard,
52
+ "MCD": constants_1.CardType.MasterCard,
53
+ "AX": constants_1.CardType.AmericanExpress,
54
+ "AXC": constants_1.CardType.AmericanExpress,
55
+ "AXD": constants_1.CardType.AmericanExpress,
56
+ "DC": constants_1.CardType.DinersClub,
57
+ "DCC": constants_1.CardType.DinersClub,
58
+ "DCD": constants_1.CardType.DinersClub,
59
+ "NV": constants_1.CardType.Discover,
60
+ "NVC": constants_1.CardType.Discover,
61
+ "NVD": constants_1.CardType.Discover,
62
+ "PL": constants_1.CardType.PrivateLabel,
63
+ "GC": constants_1.CardType.Gift,
64
+ "DB": constants_1.CardType.Debit,
65
+ "PRD": constants_1.CardType.Debit
66
+ };
67
+ exports.tenderTypeMap = {
68
+ "VI": constants_1.TenderType.Credit,
69
+ "VIC": constants_1.TenderType.Credit,
70
+ "VID": constants_1.TenderType.Debit,
71
+ "MC": constants_1.TenderType.Credit,
72
+ "MCC": constants_1.TenderType.Credit,
73
+ "MCD": constants_1.TenderType.Debit,
74
+ "AX": constants_1.TenderType.Credit,
75
+ "AXC": constants_1.TenderType.Credit,
76
+ "AXD": constants_1.TenderType.Debit,
77
+ "DC": constants_1.TenderType.Credit,
78
+ "DCC": constants_1.TenderType.Credit,
79
+ "DCD": constants_1.TenderType.Debit,
80
+ "NV": constants_1.TenderType.Credit,
81
+ "NVC": constants_1.TenderType.Credit,
82
+ "NVD": constants_1.TenderType.Debit,
83
+ "PL": constants_1.TenderType.Credit,
84
+ "GC": constants_1.TenderType.Gift,
85
+ "DB": constants_1.TenderType.Debit,
86
+ "PRD": constants_1.TenderType.Debit
87
+ };
88
+ var ResponseType;
89
+ (function (ResponseType) {
90
+ ResponseType[ResponseType["None"] = 0] = "None";
91
+ ResponseType[ResponseType["AuthResponse"] = 1] = "AuthResponse";
92
+ ResponseType[ResponseType["PaymentStatus"] = 2] = "PaymentStatus";
93
+ })(ResponseType = exports.ResponseType || (exports.ResponseType = {}));
94
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/AurusDevice/constants.ts"],"names":[],"mappings":";;AAAA,sDAA8D;AAEjD,QAAA,gBAAgB,GAAG;IAC9B,yBAAyB;IACzB,IAAI,EAAE,IAAI;IACV,MAAM,EAAE,IAAI;IACZ,aAAa,EAAE,IAAI;IACnB,YAAY,EAAE,IAAI;IAClB,WAAW,EAAE,IAAI;IACjB,IAAI,EAAE,IAAI;IACV,WAAW,EAAE,IAAI;CAClB,CAAC;AAEW,QAAA,SAAS,GAAG;IACvB,MAAM,EAAE,GAAG;IACX,MAAM,EAAE,GAAG;IACX,IAAI,EAAE,GAAG;IACT,KAAK,EAAE,GAAG;CACX,CAAC;AAEW,QAAA,iBAAiB,GAAG;IAC/B,QAAQ,EAAE,OAAO;CAClB,CAAC;AAEW,QAAA,YAAY,GAAG;IAC1B,iBAAiB,EAAE,mBAAmB;IACtC,UAAU,EAAE,mBAAmB;IAC/B,YAAY,EAAE,0BAA0B;IACxC,WAAW,EAAE,cAAc;CAC5B,C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I,EAAG,sBAAU,CAAC,MAAM;IACxB,KAAK,EAAG,sBAAU,CAAC,MAAM;IACzB,KAAK,EAAG,sBAAU,CAAC,KAAK;IACxB,IAAI,EAAG,sBAAU,CAAC,MAAM;IACxB,KAAK,EAAG,sBAAU,CAAC,MAAM;IACzB,KAAK,EAAG,sBAAU,CAAC,KAAK;IACxB,IAAI,EAAG,sBAAU,CAAC,MAAM;IACxB,KAAK,EAAG,sBAAU,CAAC,MAAM;IACzB,KAAK,EAAG,sBAAU,CAAC,KAAK;IACxB,IAAI,EAAG,sBAAU,CAAC,MAAM;IACxB,KAAK,EAAG,sBAAU,CAAC,MAAM;IACzB,KAAK,EAAG,sBAAU,CAAC,KAAK;IACxB,IAAI,EAAG,sBAAU,CAAC,MAAM;IACxB,KAAK,EAAG,sBAAU,CAAC,MAAM;IACzB,KAAK,EAAG,sBAAU,CAAC,KAAK;IACxB,IAAI,EAAG,sBAAU,CAAC,MAAM;IACxB,IAAI,EAAG,sBAAU,CAAC,IAAI;IACtB,IAAI,EAAG,sBAAU,CAAC,KAAK;IACvB,KAAK,EAAG,sBAAU,CAAC,KAAK;CACzB,CAAC;AAEF,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,+CAAQ,CAAA;IACR,+DAAqB,CAAA;IACrB,iEAAsB,CAAA;AACxB,CAAC,EAJW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAIvB"}
@@ -0,0 +1,2 @@
1
+ export * from "./sdk-interface";
2
+ export * from "./AurusPaymentDevice";
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ function __export(m) {
3
+ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
4
+ }
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ __export(require("./sdk-interface"));
7
+ __export(require("./AurusPaymentDevice"));
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/AurusDevice/index.ts"],"names":[],"mappings":";;;;;AAAA,qCAAgC;AAChC,0CAAqC"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * In order to keep code clean, clear and expedite building request xmls for
3
+ * Aurus, all fields naming follow their documented api format.
4
+ *
5
+ * Please ensure this is followed going forward.
6
+ */
7
+ export interface IAESDKRegistration {
8
+ AESDKRegistrationRequest?: IAESDKRegistrationRequest;
9
+ AESDKRegistrationResponse?: IAESDKRegistrationResponse;
10
+ }
11
+ export interface IAESDKRegistrationRequest {
12
+ POSID?: string;
13
+ FormFactorCommFlag?: string;
14
+ DateTime?: string;
15
+ StoreType?: string;
16
+ CorpID?: string;
17
+ HostUrl?: string;
18
+ }
19
+ export interface IAESDKRegistrationResponse {
20
+ FormFactorCommFlag?: string;
21
+ ResponseCode?: string;
22
+ ResponseText?: string;
23
+ StoreType?: string;
24
+ Reserved2?: string;
25
+ Reserved3?: string;
26
+ }
27
+ export interface IAESDK {
28
+ AESDKResponse?: IAESDKResponse;
29
+ }
30
+ export interface IAESDKResponse {
31
+ ResponseCode?: string;
32
+ ResponseText?: string;
33
+ }
34
+ export interface IEnablePEDLogs {
35
+ EnablePEDLogsRequest?: IEnablePEDLogsRequest;
36
+ EnablePEDLogsResponse?: IEnablePEDLogsResponse;
37
+ }
38
+ export interface IEnablePEDLogsRequest {
39
+ EnableFlag?: string;
40
+ }
41
+ export interface IEnablePEDLogsResponse {
42
+ ResponseCode?: string;
43
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ /**
3
+ * In order to keep code clean, clear and expedite building request xmls for
4
+ * Aurus, all fields naming follow their documented api format.
5
+ *
6
+ * Please ensure this is followed going forward.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ //# sourceMappingURL=AESDKRegistration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AESDKRegistration.js","sourceRoot":"","sources":["../../../src/AurusDevice/sdk-interface/AESDKRegistration.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
@@ -0,0 +1,40 @@
1
+ /// <reference types="money-works" />
2
+ import { IAuthorizationRequest, IAuthorizationResponse, IPaymentStatus } from "../../interfaces";
3
+ import { IGetCardBinResponse } from "./";
4
+ import Money = require("money-works");
5
+ export declare class AurusSupport {
6
+ static requestType: string;
7
+ static authRequest: IAuthorizationRequest;
8
+ static authResponse: IAuthorizationResponse;
9
+ static paymentStatus: IPaymentStatus;
10
+ static productionEnv: boolean;
11
+ static createCardTranRequest(getCardBinResponse?: IGetCardBinResponse): string;
12
+ static createGetCardBinRequest(): string;
13
+ static createCancelTranRequest(): string;
14
+ static createCancelLastTranRequest(): string;
15
+ static createPLCCApplicationRequest(): string;
16
+ static createAESDKRegistrationRequest(): string;
17
+ static createEnableLogs(): string;
18
+ static requireGetCard(authRequest: IAuthorizationRequest): boolean;
19
+ static stringToMoney(amount: string): Money;
20
+ /**
21
+ * Converts a request object of type T to xml to be sent to aurus
22
+ * @param arg
23
+ */
24
+ private static createRequest<T>(arg);
25
+ private static createTranRequest();
26
+ private static buildTranRequest();
27
+ private static buildAmountDetails(paymentAmount);
28
+ private static currencyCodeFromAmount(amount);
29
+ private static buildBillingAddress();
30
+ private static buildShippingAddress();
31
+ private static formatMoney(moneyAmount);
32
+ private static formatDate(now);
33
+ private static formatTime(now);
34
+ private static padNumber(line, length);
35
+ private static formatBool(value);
36
+ private static formatPOSID(store, terminal);
37
+ private static formatRequestType(value);
38
+ private static formatCountry(plccData);
39
+ private static requiredGiftCardList(requestType);
40
+ }
@@ -0,0 +1,307 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const lib_1 = require("@aptos-scp/scp-component-logging/lib");
4
+ const constants_1 = require("../../constants/constants");
5
+ const constants_2 = require("../constants");
6
+ const Money = require("money-works");
7
+ const logger = lib_1.LogManager.getLogger("com.aptos.deviceservices.AurusPaymentSupport");
8
+ class AurusSupport {
9
+ static createCardTranRequest(getCardBinResponse) {
10
+ logger.traceEntry("createCardTranRequest", getCardBinResponse);
11
+ let trans = {};
12
+ let tranRequest = this.createTranRequest();
13
+ if (getCardBinResponse) {
14
+ tranRequest.POSID = getCardBinResponse.POSID;
15
+ tranRequest.CCTID = getCardBinResponse.CCTID;
16
+ tranRequest.APPID = getCardBinResponse.APPID;
17
+ tranRequest.CardToken = getCardBinResponse.CardToken;
18
+ if (this.requiredGiftCardList(constants_1.PaymentRequestType[this.authRequest.requestType])) {
19
+ tranRequest.GiftCardList = {
20
+ GiftCard: [
21
+ {
22
+ GiftCardNumber: this.authRequest.cardNumber,
23
+ Amount: this.formatMoney(this.authRequest.amount)
24
+ }
25
+ ]
26
+ };
27
+ tranRequest.CardToken = "";
28
+ }
29
+ }
30
+ trans.TransRequest = tranRequest;
31
+ return this.createRequest(trans);
32
+ }
33
+ static createGetCardBinRequest() {
34
+ logger.traceEntry("createGetCardBinRequest");
35
+ let getCardBin = {};
36
+ let custVal = { ValidatePhoneNum: "", ValidateEmail: "", ValidateZipCode: "" };
37
+ let req = {
38
+ POSID: this.formatPOSID(this.authRequest.storeNumber, this.authRequest.terminalNumber),
39
+ LookUpFlag: 0,
40
+ AllowKeyedEntry: this.formatBool(this.authRequest.keyedEntry),
41
+ SkipPIN: this.formatBool(false),
42
+ ClerkID: this.authRequest.operatorID,
43
+ APPID: "04",
44
+ CustomerInfoValidation: custVal
45
+ };
46
+ getCardBin.GetCardBINRequest = req;
47
+ return this.createRequest(getCardBin);
48
+ }
49
+ static createCancelTranRequest() {
50
+ logger.traceEntry("createCancelTranRequest");
51
+ let cancelTran = {};
52
+ let req = {
53
+ POSID: this.formatPOSID(this.authRequest.storeNumber, this.authRequest.terminalNumber),
54
+ ClerkID: this.authRequest.operatorID,
55
+ APPID: "04", TransactionType: this.formatRequestType(constants_1.PaymentRequestType[this.authResponse.requestType]),
56
+ Date: this.authResponse.date, Time: this.authResponse.time
57
+ };
58
+ cancelTran.CancelTransRequest = req;
59
+ return this.createRequest(cancelTran);
60
+ }
61
+ static createCancelLastTranRequest() {
62
+ logger.traceEntry("createCancelLastTranRequest");
63
+ let cancelTran = {};
64
+ let req = {
65
+ POSID: this.formatPOSID(this.authRequest.storeNumber, this.authRequest.terminalNumber),
66
+ ClerkID: this.authRequest.operatorID,
67
+ APPID: "04",
68
+ TransactionType: this.formatRequestType(constants_1.PaymentRequestType[this.authResponse.requestType]),
69
+ Date: this.authResponse.date,
70
+ Time: this.authResponse.time
71
+ };
72
+ cancelTran.CancelLastTransRequest = req;
73
+ return this.createRequest(cancelTran);
74
+ }
75
+ static createPLCCApplicationRequest() {
76
+ logger.traceEntry("createGetCardBinRequest");
77
+ let plccAppl = {};
78
+ //TODO complete request "" - > req data
79
+ let req = {
80
+ POSID: this.formatPOSID(this.authRequest.storeNumber, this.authRequest.terminalNumber),
81
+ ClerkID: this.authRequest.operatorID,
82
+ APPID: "04",
83
+ ApplicantCurrentAddress1: "",
84
+ ApplicantCurrentAddress2: "",
85
+ ApplicantCurrentCity: "",
86
+ ApplicantEmailAddress: "",
87
+ ApplicantFirstName: "",
88
+ ApplicantLastName: "",
89
+ ApplicantMiddleName: "",
90
+ ApplicantMobileNumber: "",
91
+ ApplicantState: "",
92
+ ApplicantTitle: "",
93
+ ApplicantType: "",
94
+ ApplicantProvince: "",
95
+ DateOfBirth: "",
96
+ DriversLicenseNumber: "",
97
+ DriversLicenseStateCode: "",
98
+ Country: this.formatCountry(this.authRequest.plccData)
99
+ };
100
+ plccAppl.PLCCApplicationRequest = req;
101
+ return this.createRequest(plccAppl);
102
+ }
103
+ // FIXME: Get UAT/Prod settings from config.
104
+ static createAESDKRegistrationRequest() {
105
+ logger.traceEntry("createAESDKRegistrationRequest");
106
+ let aesdkReg = {};
107
+ let date = this.formatDate(new Date());
108
+ let req = {
109
+ POSID: this.formatPOSID(this.authRequest.storeNumber, this.authRequest.terminalNumber),
110
+ DateTime: date,
111
+ // UAT settings
112
+ StoreType: "UAT",
113
+ CorpID: "6162",
114
+ HostUrl: "uat42"
115
+ };
116
+ if (this.productionEnv) {
117
+ //Production Settings
118
+ req.StoreType = "PROD";
119
+ req.CorpID = "12394";
120
+ req.HostUrl = "ms01";
121
+ }
122
+ aesdkReg.AESDKRegistrationRequest = req;
123
+ return this.createRequest(aesdkReg);
124
+ }
125
+ static createEnableLogs() {
126
+ let enableLogs = {};
127
+ let req = { EnableFlag: "1" };
128
+ enableLogs.EnablePEDLogsRequest = req;
129
+ return this.createRequest(enableLogs);
130
+ }
131
+ static requireGetCard(authRequest) {
132
+ let retVal = true;
133
+ if (authRequest.cardNumber || authRequest.plccData) {
134
+ retVal = false;
135
+ }
136
+ return retVal;
137
+ }
138
+ static stringToMoney(amount) {
139
+ if (amount) {
140
+ return new Money(amount.toString(), "USD");
141
+ }
142
+ return undefined;
143
+ }
144
+ /**
145
+ * Converts a request object of type T to xml to be sent to aurus
146
+ * @param arg
147
+ */
148
+ static createRequest(arg) {
149
+ //todo: remove this import from function.
150
+ let xml2js = require("react-native-xml2js");
151
+ let builder = new xml2js.Builder();
152
+ let retVal = builder.buildObject(arg);
153
+ return retVal;
154
+ }
155
+ static createTranRequest() {
156
+ let req = this.buildTranRequest();
157
+ if (this.requiredGiftCardList(constants_1.PaymentRequestType[this.authRequest.requestType])) {
158
+ req.GiftCardList = {
159
+ GiftCard: [
160
+ {
161
+ GiftCardNumber: this.authRequest.cardNumber,
162
+ Amount: this.formatMoney(this.authRequest.amount)
163
+ }
164
+ ]
165
+ };
166
+ }
167
+ return req;
168
+ }
169
+ static buildTranRequest() {
170
+ let now = new Date();
171
+ return {
172
+ POSID: this.formatPOSID(this.authRequest.storeNumber, this.authRequest.terminalNumber),
173
+ APPID: "",
174
+ CCTID: "",
175
+ CardToken: this.authRequest.cardNumber,
176
+ CardPresent: this.formatBool(true),
177
+ GiftPurchaseAuthIndicator: this.formatBool(false),
178
+ PurchaserPresent: this.formatBool(true),
179
+ EntrySource: "",
180
+ KeyedEntryAVSFlag: "N",
181
+ TransAmountDetails: this.buildAmountDetails(this.authRequest.amount),
182
+ TransactionType: this.formatRequestType(constants_1.PaymentRequestType[this.authRequest.requestType]),
183
+ InvoiceNumber: this.authRequest.transactionNumber.toString(),
184
+ ReferenceNumber: this.authRequest.transactionNumber.toString(),
185
+ CurrencyCode: this.currencyCodeFromAmount(this.authRequest.amount),
186
+ ClerkID: this.authRequest.operatorID,
187
+ TransactionDate: this.formatDate(now),
188
+ TransactionTime: this.formatTime(now),
189
+ TipEligible: 0,
190
+ AmountNoBar: 1,
191
+ SignatureFlag: this.formatBool(true),
192
+ BatchNumber: 12345,
193
+ BillingAddress: this.buildBillingAddress(),
194
+ ShippingAddress: this.buildShippingAddress(),
195
+ PreSaleDate: "",
196
+ EqualPayPlanNum: "",
197
+ ReceiptNumber: this.authRequest.transactionNumber.toString(),
198
+ OrigAurusPayTicketNum: this.authRequest.referenceNumber
199
+ };
200
+ }
201
+ static buildAmountDetails(paymentAmount) {
202
+ return {
203
+ ProductTotalAmount: this.formatMoney(paymentAmount),
204
+ //If these are truly needed, they will need to be added to the interface.
205
+ ServicesTotalAmount: "0.00",
206
+ TaxAmount: "0.00",
207
+ Discount: "0.00",
208
+ TransactionTotal: this.formatMoney(paymentAmount) + "~" + this.formatMoney(paymentAmount)
209
+ };
210
+ }
211
+ // FIXME: Default to 840 (USD). Revisit for additional currency codes. Should Money have both numeric and alpha codes?
212
+ static currencyCodeFromAmount(amount) {
213
+ let currenyCode = "840";
214
+ if (amount && amount.currency) {
215
+ if (amount.currency === "USD") {
216
+ currenyCode = "840";
217
+ }
218
+ }
219
+ return currenyCode;
220
+ }
221
+ static buildBillingAddress() {
222
+ // Note: Aurus errors if these are not sent - currently no support for address
223
+ return {
224
+ BillingMobileNumber: "",
225
+ BillingOtherNumber: ""
226
+ };
227
+ }
228
+ static buildShippingAddress() {
229
+ // Note: Aurus errors if these are not sent - currently no support for address
230
+ return {
231
+ ShippingMobileNumber: "",
232
+ ShippingOtherNumber: ""
233
+ };
234
+ }
235
+ static formatMoney(moneyAmount) {
236
+ let amount = moneyAmount || new Money("0.00", "USD");
237
+ return parseFloat(amount.amount.toString()).toFixed(amount.precision());
238
+ }
239
+ static formatDate(now) {
240
+ let date = this.padNumber(now.getMonth() + 1, 2) + this.padNumber(now.getDate(), 2) +
241
+ this.padNumber(now.getFullYear(), 4);
242
+ this.authResponse.date = date;
243
+ return date;
244
+ }
245
+ static formatTime(now) {
246
+ return this.padNumber(now.getHours(), 2) + this.padNumber(now.getMinutes(), 2) +
247
+ this.padNumber(now.getSeconds(), 2);
248
+ }
249
+ static padNumber(line, length) {
250
+ let retVal = "00000000000" + line;
251
+ return retVal.substring(retVal.length - length);
252
+ }
253
+ static formatBool(value) {
254
+ return value ? "Y" : "N";
255
+ }
256
+ static formatPOSID(store, terminal) {
257
+ //Currently Aurus only supports an 8 digit posID. This will need to be changed to 9 (3 digit terminal)
258
+ return this.padNumber(store, 6) + this.padNumber(terminal, 2);
259
+ }
260
+ static formatRequestType(value) {
261
+ let retVal = constants_2.TransactionTypes.SALE;
262
+ switch (value) {
263
+ case constants_1.PaymentRequestType.Sale:
264
+ retVal = constants_2.TransactionTypes.SALE;
265
+ break;
266
+ case constants_1.PaymentRequestType.Refund:
267
+ retVal = constants_2.TransactionTypes.RETURN;
268
+ break;
269
+ case constants_1.PaymentRequestType.GiftCardBalanceInquiry:
270
+ retVal = constants_2.TransactionTypes.VALUE_INQUIRY;
271
+ break;
272
+ case constants_1.PaymentRequestType.GiftCardIssue:
273
+ retVal = constants_2.TransactionTypes.VALUE_ISSUE;
274
+ break;
275
+ case constants_1.PaymentRequestType.GiftCardRedeem:
276
+ retVal = constants_2.TransactionTypes.VALUE_REDEEM;
277
+ break;
278
+ default:
279
+ break;
280
+ }
281
+ return retVal;
282
+ }
283
+ static formatCountry(plccData) {
284
+ //TODO
285
+ return "";
286
+ }
287
+ static requiredGiftCardList(requestType) {
288
+ let retVal = false;
289
+ //Aurus doesn't use gift card list? 121417 email
290
+ // switch (requestType) {
291
+ // case PaymentRequestType.GiftCardBalanceInquiry:
292
+ // case PaymentRequestType.GiftCardIssue:
293
+ // case PaymentRequestType.GiftCardRedeem:
294
+ // retVal = true;
295
+ // break;
296
+ // default:
297
+ // retVal = false;
298
+ // break;
299
+ // }
300
+ return retVal;
301
+ }
302
+ }
303
+ AurusSupport.authResponse = {};
304
+ AurusSupport.paymentStatus = { deviceAvailable: false };
305
+ AurusSupport.productionEnv = false;
306
+ exports.AurusSupport = AurusSupport;
307
+ //# sourceMappingURL=AurusPaymentSupport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AurusPaymentSupport.js","sourceRoot":"","sources":["../../../src/AurusDevice/sdk-interface/AurusPaymentSupport.ts"],"names":[],"mappings":";;AAAA,8DAA2E;AAC3E,yDAA+D;AAE/D,4CAAgD;AAuBhD,qCAAsC;AAEtC,MAAM,MAAM,GAAY,gBAAU,CAAC,SAAS,CAAC,8CAA8C,CAAC,CAAC;AAE7F;IAQS,MAAM,CAAC,qBAAqB,CAAC,kBAAwC;QAC1E,MAAM,CAAC,UAAU,CAAC,uBAAuB,EAAE,kBAAkB,CAAC,CAAC;QAC/D,IAAI,KAAK,GAAiB,EAAE,CAAC;QAC7B,IAAI,WAAW,GAAiB,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACzD,EAAE,CAAC,CAAE,kBAAmB,CAAC,CAAC,CAAC;YACzB,WAAW,CAAC,KAAK,GAAG,kBAAkB,CAAC,KAAK,CAAC;YAC7C,WAAW,CAAC,KAAK,GAAG,kBAAkB,CAAC,KAAK,CAAC;YAC7C,WAAW,CAAC,KAAK,GAAG,kBAAkB,CAAC,KAAK,CAAC;YAC7C,WAAW,CAAC,SAAS,GAAG,kBAAkB,CAAC,SAAS,CAAC;YACrD,EAAE,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,8BAAkB,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;gBAChF,WAAW,CAAC,YAAY,GAAG;oBACzB,QAAQ,EAAE;wBACR;4BACE,cAAc,EAAE,IAAI,CAA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AgB,CAAC,aAAa,CAAC;gBACxC,KAAK,CAAC;YACR,KAAK,8BAAkB,CAAC,aAAa;gBACnC,MAAM,GAAG,4BAAgB,CAAC,WAAW,CAAC;gBACtC,KAAK,CAAC;YACR,KAAK,8BAAkB,CAAC,cAAc;gBACpC,MAAM,GAAG,4BAAgB,CAAC,YAAY,CAAC;gBACvC,KAAK,CAAC;YACR;gBACE,KAAK,CAAC;QACV,CAAC;QACD,MAAM,CAAC,MAAM,CAAC;IAChB,CAAC;IAEO,MAAM,CAAC,aAAa,CAAC,QAAmB;QAC9C,MAAM;QACN,MAAM,CAAC,EAAE,CAAC;IACZ,CAAC;IAEO,MAAM,CAAC,oBAAoB,CAAC,WAA+B;QACjE,IAAI,MAAM,GAAY,KAAK,CAAC;QAC5B,gDAAgD;QAChD,yBAAyB;QACzB,oDAAoD;QACpD,2CAA2C;QAC3C,4CAA4C;QAC5C,qBAAqB;QACrB,aAAa;QACb,cAAc;QACd,sBAAsB;QACtB,aAAa;QACb,IAAI;QACJ,MAAM,CAAC,MAAM,CAAC;IAChB,CAAC;;AA1Ua,yBAAY,GAA2B,EAAE,CAAC;AAC1C,0BAAa,GAAmB,EAAE,eAAe,EAAG,KAAK,EAAE,CAAC;AAC5D,0BAAa,GAAY,KAAK,CAAC;AAN/C,oCA+UC"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * In order to keep code clean, clear and expedite building request xmls for
3
+ * Aurus, all fields naming follow their documented api format.
4
+ *
5
+ * Please ensure this is followed going forward.
6
+ */
7
+ export interface ICancelTrans {
8
+ CancelTransRequest?: ICancelTransRequest;
9
+ CancelTransResponse?: ICancelTransResponse;
10
+ }
11
+ export interface ICancelTransRequest {
12
+ POSID?: string;
13
+ APPID?: string;
14
+ CCTID?: string;
15
+ TransactionType?: string;
16
+ Date?: string;
17
+ Time?: string;
18
+ ClerkID?: string;
19
+ }
20
+ export interface ICancelTransResponse {
21
+ POSID?: string;
22
+ APPID?: string;
23
+ CCTID?: string;
24
+ ResponseCode?: string;
25
+ ResponseText?: string;
26
+ }
27
+ export interface ICancelLastTrans {
28
+ CancelLastTransRequest?: ICancelLastTransRequest;
29
+ CancelLastTransResponse?: ICancelLastTransResponse;
30
+ }
31
+ export interface ICancelLastTransRequest {
32
+ POSID?: string;
33
+ APPID?: string;
34
+ CCTID?: string;
35
+ TransactionType?: string;
36
+ AurusPayTicketNum?: string;
37
+ TransactionIdentifier?: string;
38
+ Date?: string;
39
+ Time?: string;
40
+ MidVoidReason?: string;
41
+ ClerkID?: string;
42
+ }
43
+ export interface ICancelLastTransResponse {
44
+ POSID?: string;
45
+ APPID?: string;
46
+ CCTID?: string;
47
+ ResponseCode?: string;
48
+ ResponseText?: string;
49
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ /**
3
+ * In order to keep code clean, clear and expedite building request xmls for
4
+ * Aurus, all fields naming follow their documented api format.
5
+ *
6
+ * Please ensure this is followed going forward.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ //# sourceMappingURL=CancelTransaction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CancelTransaction.js","sourceRoot":"","sources":["../../../src/AurusDevice/sdk-interface/CancelTransaction.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * In order to keep code clean, clear and expedite building request xmls for
3
+ * Aurus, all fields naming follow their documented api format.
4
+ *
5
+ * Please ensure this is followed going forward.
6
+ */
7
+ import { ICustomerInfoValidation } from "./TransactionRequest";
8
+ export interface IGetCardBin {
9
+ GetCardBINRequest?: IGetCardBinRequest;
10
+ GetCardBINResponse?: IGetCardBinResponse;
11
+ }
12
+ export interface IGetCardBinRequest {
13
+ POSID?: string;
14
+ APPID?: string;
15
+ CCTID?: string;
16
+ LookUpFlag?: number;
17
+ AllowKeyedEntry?: string;
18
+ SkipPIN?: string;
19
+ CustomerInfoValidation?: ICustomerInfoValidation;
20
+ ClerkID?: string;
21
+ }
22
+ export interface IGetCardBinResponse {
23
+ POSID?: string;
24
+ APPID?: string;
25
+ CCTID?: string;
26
+ CardType?: string;
27
+ CardToken?: string;
28
+ CardTokeDetailData?: string;
29
+ FirstName?: string;
30
+ LastName?: string;
31
+ CardExpiryDate?: string;
32
+ CustomerInfoValidationResult?: string;
33
+ ResponseCode?: string;
34
+ ResponseText?: string;
35
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ /**
3
+ * In order to keep code clean, clear and expedite building request xmls for
4
+ * Aurus, all fields naming follow their documented api format.
5
+ *
6
+ * Please ensure this is followed going forward.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ //# sourceMappingURL=GetCardBinRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GetCardBinRequest.js","sourceRoot":"","sources":["../../../src/AurusDevice/sdk-interface/GetCardBinRequest.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}