@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,64 @@
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 IPLCCApplication {
8
+ PLCCApplicationRequest?: IPLCCApplicationRequest;
9
+ IPLCCApplicationResponse?: IPLCCApplicationResponse;
10
+ }
11
+ export interface IPLCCApplicationRequest {
12
+ POSID?: string;
13
+ APPID?: string;
14
+ CCTID?: string;
15
+ Header?: number;
16
+ ApplicantTitle?: string;
17
+ ApplicantFirstName?: string;
18
+ ApplicantMiddleName?: string;
19
+ ApplicantLastName?: string;
20
+ DriversLicenseStateCode?: string;
21
+ DriversLicenseNumber?: string;
22
+ DLIntellicheckFlag?: string;
23
+ DateOfBirth?: string;
24
+ AppNumber?: string;
25
+ ApplicantCurrentAddress1?: string;
26
+ ApplicantCurrentAddress2?: string;
27
+ ApplicantCurrentCity?: string;
28
+ ApplicantState?: string;
29
+ ApplicantProvince?: string;
30
+ ApplicantZip?: string;
31
+ ApplicantMobileNumber?: string;
32
+ ApplicantOtherNumber?: string;
33
+ PartnerNumber?: string;
34
+ ApplicantEmailAddress?: string;
35
+ ApplicantEmailUpdateCode?: string;
36
+ ApplicantHousingIndicator?: string;
37
+ ApartmentNumber?: string;
38
+ ApplicantType?: string;
39
+ CountryIDType?: string;
40
+ Country?: string;
41
+ ProgramCode?: string;
42
+ UpgradeIndicator?: string;
43
+ UpgradeKey?: string;
44
+ CertNumber?: string;
45
+ SecondaryId?: string;
46
+ SecondaryIdExpiratonDate?: string;
47
+ SkipSecondaryId?: string;
48
+ SecondaryCardValidaton?: string;
49
+ SecondaryByPassReasonCode?: string;
50
+ ClerkID?: string;
51
+ }
52
+ export interface IPLCCApplicationResponse {
53
+ POSID?: string;
54
+ APPID?: string;
55
+ CCTID?: string;
56
+ Header?: string;
57
+ ResponseCode?: string;
58
+ ResponseText?: string;
59
+ ReferenceNum?: string;
60
+ ApprovedCreditLimit?: string;
61
+ SecondaryCardValidatonResultCode?: string;
62
+ PLCCResultCode?: string;
63
+ PLCCResultMessage?: string;
64
+ }
@@ -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=PLCCApplication.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PLCCApplication.js","sourceRoot":"","sources":["../../../src/AurusDevice/sdk-interface/PLCCApplication.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
@@ -0,0 +1,159 @@
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 ITransaction {
8
+ TransRequest?: ITranRequest;
9
+ TransResponse?: ITranResponse;
10
+ }
11
+ export interface ITranRequest {
12
+ POSID?: string;
13
+ APPID?: string;
14
+ CCTID?: string;
15
+ CardToken?: string;
16
+ CardNumber?: string;
17
+ CardLastFour?: string;
18
+ CustomerIdentifier?: string;
19
+ CardPresent?: string;
20
+ PurchaserPresent?: string;
21
+ EntrySource?: string;
22
+ KeyedEntryAVSFlag?: string;
23
+ KeyedEntryReasonCode?: string;
24
+ GiftPurchaseAuthIndicator?: string;
25
+ TransAmountDetails?: ITransAmountDetails;
26
+ GiftCardList?: IGiftCardList;
27
+ TransactionType?: string;
28
+ InvoiceNumber?: string;
29
+ ReceiptNumber?: string;
30
+ ReferenceNumber?: string;
31
+ POSIP?: string;
32
+ POSClientName?: string;
33
+ POSVersion?: string;
34
+ CustomerFirstName?: string;
35
+ CustomerLastName?: string;
36
+ WalletIdentifier?: string;
37
+ DLIntelliCheckFlag?: string;
38
+ BillingAddress?: IBillingAddress;
39
+ ShippingAddress?: IShippingAddress;
40
+ PreSaleDate?: string;
41
+ OrigAurusPayTicketNum?: string;
42
+ OrigTransactionIdentified?: string;
43
+ ApprovalCode?: string;
44
+ ReferralNum?: string;
45
+ EqualPayPlanNum?: string;
46
+ CurrencyCode?: string;
47
+ ClerkID?: string;
48
+ TransactionDate?: string;
49
+ TransactionTime?: string;
50
+ TransactionAmount?: string;
51
+ TipEligible?: number;
52
+ AmountNoBar?: number;
53
+ BatchNumber?: number;
54
+ TicketProductData?: string;
55
+ TenderTypeRestrictions?: string;
56
+ SignatureFlag?: string;
57
+ PLCCPaymentMethod?: string;
58
+ Reserved1?: string;
59
+ Reserver2?: string;
60
+ }
61
+ export interface IGiftCardList {
62
+ GiftCard?: IGiftCard[];
63
+ }
64
+ export interface IGiftCard {
65
+ GiftCardNumber?: string;
66
+ Amount?: string;
67
+ }
68
+ export interface ITransAmountDetails {
69
+ ServicesTotalAmount?: string;
70
+ ProductTotalAmount?: string;
71
+ TaxAmount?: string;
72
+ Discount?: string;
73
+ TransactionTotal?: string;
74
+ }
75
+ export interface ITransDetailsData {
76
+ TransDetailData?: ITransDetailData[];
77
+ }
78
+ export interface ITransDetailData {
79
+ CardNumber?: string;
80
+ CardType?: string;
81
+ CardEntryMode?: string;
82
+ TransactionAmount?: string;
83
+ TipAmount?: string;
84
+ TransactionIdentifier?: string;
85
+ ResponseCode?: string;
86
+ TransactionResponseText?: string;
87
+ ApprovalCode?: string;
88
+ BalanceAmount?: string;
89
+ AuthAVSResult?: string;
90
+ TransactionSequenceNumber?: string;
91
+ CardExpiryDate?: string;
92
+ CustomerName?: string;
93
+ CustomerTokenNumber?: string;
94
+ SignatureReceiptFlag?: string;
95
+ EMVFlag?: number;
96
+ EMVData?: string;
97
+ VoidData?: string;
98
+ LoyaltyInfo?: ILoyaltyInfo;
99
+ ReferralNUM?: string;
100
+ ReferralDialInformation?: string;
101
+ OpenToPayCash?: string;
102
+ OpenToBuy?: string;
103
+ ProcessorResponseCode?: string;
104
+ ProcessorMerchantId?: string;
105
+ IsFallback?: string;
106
+ Reserved1?: string;
107
+ }
108
+ export interface ILoyaltyInfo {
109
+ Usepoints?: string;
110
+ BalancePoint?: string;
111
+ Expiry?: string;
112
+ LoyaltyLevel?: string;
113
+ }
114
+ export interface ICustomerInfoValidation {
115
+ ValidateEmail?: string;
116
+ ValidatePhoneNum?: string;
117
+ ValidateZipCode?: string;
118
+ Reserved1?: string;
119
+ Reserved2?: string;
120
+ }
121
+ export interface ITranResponse {
122
+ POSID?: string;
123
+ APPID?: string;
124
+ CCTID?: string;
125
+ TransDetailsData?: ITransDetailsData[];
126
+ BatchNumber?: string;
127
+ AurusPayTicketNum?: string;
128
+ FirmwareUpgradeAvailable?: string;
129
+ POSTID?: string;
130
+ IsFallback?: string;
131
+ }
132
+ export interface IBillingAddress {
133
+ BillingName?: string;
134
+ BillingCity?: string;
135
+ BillingAddressLine1?: string;
136
+ BillingAddressLine2?: string;
137
+ BillingAddressLine3?: string;
138
+ BillingZip?: string;
139
+ BillingState?: string;
140
+ BillingProvince?: string;
141
+ Billingcountry?: string;
142
+ BillingMobileNumber?: string;
143
+ BillingOtherNumber?: string;
144
+ BillingEmailId?: string;
145
+ }
146
+ export interface IShippingAddress {
147
+ ShippingName?: string;
148
+ ShippingCity?: string;
149
+ ShippingAddressLine1?: string;
150
+ ShippingAddressLine2?: string;
151
+ ShippingAddressLine3?: string;
152
+ ShippingZip?: string;
153
+ ShippingState?: string;
154
+ ShippingProvince?: string;
155
+ Shippingcountry?: string;
156
+ ShippingMobileNumber?: string;
157
+ ShippingOtherNumber?: string;
158
+ ShippingEmailId?: string;
159
+ }
@@ -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=TransactionRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TransactionRequest.js","sourceRoot":"","sources":["../../../src/AurusDevice/sdk-interface/TransactionRequest.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
@@ -0,0 +1,6 @@
1
+ export * from "./AESDKRegistration";
2
+ export * from "./AurusPaymentSupport";
3
+ export * from "./CancelTransaction";
4
+ export * from "./GetCardBinRequest";
5
+ export * from "./PLCCApplication";
6
+ export * from "./TransactionRequest";
@@ -0,0 +1,7 @@
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("./AurusPaymentSupport"));
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/AurusDevice/sdk-interface/index.ts"],"names":[],"mappings":";;;;;AACA,2CAAsC"}
@@ -0,0 +1,11 @@
1
+ import { EventEmitter } from "fbemitter";
2
+ import { IPaymentDevice, IPaymentDeviceConfiguration } from "./interfaces/payment/IPayment";
3
+ /**
4
+ * The create method is used to create an instance of deviceProvider matching IPaymentDeviceService. It hides the
5
+ * native component initialization from the caller.
6
+ *
7
+ * @param {EventEmitter} deviceNotificationEmitter
8
+ * @param {IPaymentDeviceConfiguration} deviceConfiguration
9
+ * @return {IPaymentDevice}
10
+ */
11
+ export declare function createPaymentDevice(deviceNotificationEmitter: EventEmitter, deviceConfiguration: IPaymentDeviceConfiguration): IPaymentDevice;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ // FIXME: Refactor this to a payment device service control class.
3
+ // We will want this to use a provider based on config rather than return one.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ const scp_component_logging_1 = require("@aptos-scp/scp-component-logging");
6
+ const constants_1 = require("./constants");
7
+ const AurusPaymentDevice_1 = require("./AurusDevice/AurusPaymentDevice");
8
+ const logger = scp_component_logging_1.LogManager.getLogger("com.aptos.deviceservices.PaymentDeviceServiceFactory");
9
+ /**
10
+ * The create method is used to create an instance of deviceProvider matching IPaymentDeviceService. It hides the
11
+ * native component initialization from the caller.
12
+ *
13
+ * @param {EventEmitter} deviceNotificationEmitter
14
+ * @param {IPaymentDeviceConfiguration} deviceConfiguration
15
+ * @return {IPaymentDevice}
16
+ */
17
+ function createPaymentDevice(deviceNotificationEmitter, deviceConfiguration) {
18
+ const entryMessage = logger.traceEntry("createPaymentDeviceService", deviceNotificationEmitter, deviceConfiguration);
19
+ let paymentDevice;
20
+ let deviceProvider = deviceConfiguration.deviceProvider;
21
+ if (deviceProvider === constants_1.Providers.ADYEN) {
22
+ //paymentDevice = new AdyenPaymentService(deviceNotificationEmitter);
23
+ }
24
+ else if (deviceProvider === constants_1.Providers.AURUS) {
25
+ paymentDevice = new AurusPaymentDevice_1.AurusPaymentDevice(deviceConfiguration, deviceNotificationEmitter);
26
+ }
27
+ else {
28
+ throw logger.throwing(new Error(`Unrecognized device provider: ${deviceProvider}`), entryMessage);
29
+ }
30
+ return paymentDevice;
31
+ }
32
+ exports.createPaymentDevice = createPaymentDevice;
33
+ //# sourceMappingURL=PaymentDeviceFactory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaymentDeviceFactory.js","sourceRoot":"","sources":["../src/PaymentDeviceFactory.ts"],"names":[],"mappings":";AAAA,kEAAkE;AAClE,8EAA8E;;AAE9E,4EAAyF;AAGzF,2CAAwC;AAExC,yEAAsE;AAGtE,MAAM,MAAM,GAAY,kCAAU,CAAC,SAAS,CAAC,sDAAsD,CAAC,CAAC;AAErG;;;;;;;GAOG;AACH,6BACI,yBAAuC,EAAE,mBAAgD;IAE3F,MAAM,YAAY,GACd,MAAM,CAAC,UAAU,CAAC,4BAA4B,EAAE,yBAAyB,EAAE,mBAAmB,CAAC,CAAC;IAEpG,IAAI,aAA6B,CAAC;IAClC,IAAI,cAAc,GAAW,mBAAmB,CAAC,cAAc,CAAC;IAChE,EAAE,CAAC,CAAC,cAAc,KAAK,qBAAS,CAAC,KAAK,CAAC,CAAC,CAAC;QACvC,qEAAqE;IACvE,CAAC;IAAC,IAAI,CAAC,EAAE,CAAC,CAAC,cAAc,KAAK,qBAAS,CAAC,KAAK,CAAC,CAAC,CAAC;QAC9C,aAAa,GAAG,IAAI,uCAAkB,CAAC,mBAAmB,EAAE,yBAAyB,CAAC,CAAC;IACzF,CAAC;IAAC,IAAI,CAAC,CAAC;QACN,MAAM,MAAM,CAAC,QAAQ,CAAC,IAAI,KAAK,CAAC,iCAAiC,cAAc,EAAE,CAAC,EAAE,YAAY,CAAC,CAAC;IACpG,CAAC;IAED,MAAM,CAAC,aAAa,CAAC;AACvB,CAAC;AAjBD,kDAiBC"}
@@ -0,0 +1,19 @@
1
+ import { EventEmitter } from "fbemitter";
2
+ import { IAuthorizationContext, IPaymentDevice, IPaymentDeviceConfiguration, IPaymentDeviceService } from "./interfaces/payment/IPayment";
3
+ import { IBankCardRequest, IGiftCardRequest } from "./interfaces/payment/messages/requests";
4
+ export declare class PaymentDeviceService implements IPaymentDeviceService {
5
+ protected _methodMapper: Map<string, string[]>;
6
+ protected _devices: Map<string, IPaymentDevice>;
7
+ constructor(configuration: IPaymentDeviceConfiguration, deviceNotificationEmitter: EventEmitter);
8
+ initialize(): Promise<void>;
9
+ start(): Promise<void>;
10
+ stop(): Promise<void>;
11
+ tearDown(): Promise<void>;
12
+ captureSale(request: IBankCardRequest): Promise<IAuthorizationContext>;
13
+ captureRefund(request: IBankCardRequest): Promise<IAuthorizationContext>;
14
+ giftcardActivate(request: IGiftCardRequest): Promise<IAuthorizationContext>;
15
+ giftcardBalance(request: IGiftCardRequest): Promise<IAuthorizationContext>;
16
+ giftcardIssue(request: IGiftCardRequest): Promise<IAuthorizationContext>;
17
+ giftcardRedeem(request: IGiftCardRequest): Promise<IAuthorizationContext>;
18
+ void(request: IBankCardRequest): Promise<IAuthorizationContext>;
19
+ }
@@ -0,0 +1,129 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ const scp_component_logging_1 = require("@aptos-scp/scp-component-logging");
12
+ const PaymentDeviceFactory_1 = require("./PaymentDeviceFactory");
13
+ const logger = scp_component_logging_1.LogManager.getLogger("com.aptos.deviceservices.PaymentDeviceService");
14
+ class PaymentDeviceService {
15
+ constructor(configuration, deviceNotificationEmitter) {
16
+ this._methodMapper = new Map([
17
+ ["initialize", []],
18
+ ["start", []],
19
+ ["stop", []],
20
+ ["tearDown", []],
21
+ ["captureSale", []],
22
+ ["captureRefund", []],
23
+ ["giftcardActivate", []],
24
+ ["giftcardBalance", []],
25
+ ["giftcardIssue", []],
26
+ ["giftcardRedeem", []],
27
+ ["void", []]
28
+ ]);
29
+ this._devices = new Map();
30
+ /**
31
+ * There are multiple ways in which this can be accomplished. It largely
32
+ * depends on how the underlying devices will be utilized and in what way
33
+ * they will be configured.
34
+ *
35
+ * The initial primary idea is to have a mapping of request types and
36
+ * cooresponding provider (device) that command should be using.
37
+ */
38
+ logger.trace("constructor of payment device service.");
39
+ let device = PaymentDeviceFactory_1.createPaymentDevice(deviceNotificationEmitter, configuration);
40
+ let name = configuration.deviceProvider;
41
+ this._devices.set(name, device);
42
+ this._methodMapper.get("initialize").push(name);
43
+ this._methodMapper.get("start").push(name);
44
+ this._methodMapper.get("stop").push(name);
45
+ this._methodMapper.get("tearDown").push(name);
46
+ this._methodMapper.get("captureSale").push(name);
47
+ this._methodMapper.get("captureRefund").push(name);
48
+ this._methodMapper.get("giftcardActivate").push(name);
49
+ this._methodMapper.get("giftcardBalance").push(name);
50
+ this._methodMapper.get("giftcardIssue").push(name);
51
+ this._methodMapper.get("giftcardRedeem").push(name);
52
+ this._methodMapper.get("void").push(name);
53
+ }
54
+ initialize() {
55
+ return __awaiter(this, void 0, void 0, function* () {
56
+ this._methodMapper.get("initialize").map((name) => this._devices.get(name)).map((device) => device.initialize());
57
+ });
58
+ }
59
+ ;
60
+ start() {
61
+ return __awaiter(this, void 0, void 0, function* () {
62
+ this._methodMapper.get("start").map((name) => this._devices.get(name)).map((device) => device.start());
63
+ });
64
+ }
65
+ ;
66
+ stop() {
67
+ return __awaiter(this, void 0, void 0, function* () {
68
+ this._methodMapper.get("stop").map((name) => this._devices.get(name)).map((device) => device.stop());
69
+ });
70
+ }
71
+ ;
72
+ tearDown() {
73
+ return __awaiter(this, void 0, void 0, function* () {
74
+ this._methodMapper.get("tearDown").map((name) => this._devices.get(name)).map((device) => device.tearDown());
75
+ });
76
+ }
77
+ ;
78
+ captureSale(request) {
79
+ return __awaiter(this, void 0, void 0, function* () {
80
+ this._methodMapper.get("captureSale").map((name) => this._devices.get(name)).map((device) => device.captureSale(request));
81
+ return;
82
+ });
83
+ }
84
+ ;
85
+ captureRefund(request) {
86
+ return __awaiter(this, void 0, void 0, function* () {
87
+ this._methodMapper.get("captureRefund").map((name) => this._devices.get(name)).map((device) => device.captureRefund(request));
88
+ return;
89
+ });
90
+ }
91
+ ;
92
+ giftcardActivate(request) {
93
+ return __awaiter(this, void 0, void 0, function* () {
94
+ this._methodMapper.get("giftcardActivate").map((name) => this._devices.get(name)).map((device) => device.giftcardActivate(request));
95
+ return;
96
+ });
97
+ }
98
+ ;
99
+ giftcardBalance(request) {
100
+ return __awaiter(this, void 0, void 0, function* () {
101
+ this._methodMapper.get("giftcardBalance").map((name) => this._devices.get(name)).map((device) => device.giftcardBalance(request));
102
+ return;
103
+ });
104
+ }
105
+ ;
106
+ giftcardIssue(request) {
107
+ return __awaiter(this, void 0, void 0, function* () {
108
+ this._methodMapper.get("giftcardIssue").map((name) => this._devices.get(name)).map((device) => device.giftcardIssue(request));
109
+ return;
110
+ });
111
+ }
112
+ ;
113
+ giftcardRedeem(request) {
114
+ return __awaiter(this, void 0, void 0, function* () {
115
+ this._methodMapper.get("giftcardRedeem").map((name) => this._devices.get(name)).map((device) => device.giftcardRedeem(request));
116
+ return;
117
+ });
118
+ }
119
+ ;
120
+ void(request) {
121
+ return __awaiter(this, void 0, void 0, function* () {
122
+ this._methodMapper.get("void").map((name) => this._devices.get(name)).map((device) => device.void(request));
123
+ return;
124
+ });
125
+ }
126
+ ;
127
+ }
128
+ exports.PaymentDeviceService = PaymentDeviceService;
129
+ //# sourceMappingURL=PaymentDeviceService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaymentDeviceService.js","sourceRoot":"","sources":["../src/PaymentDeviceService.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,4EAAuE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K,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAC1C,CAAC,GAAG,CACH,CAAC,MAAsB,KAAK,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CACjD,CAAC;YACF,MAAM,CAAC;QACT,CAAC;KAAA;IAAA,CAAC;CACH;AA1ID,oDA0IC"}
@@ -0,0 +1,52 @@
1
+ export declare const Providers: {
2
+ ADYEN: string;
3
+ AURUS: string;
4
+ };
5
+ export declare const EventResponseTypes: {
6
+ Authorization: string;
7
+ PaymentDeviceStatus: string;
8
+ };
9
+ export declare enum CardType {
10
+ Unknown = 0,
11
+ Visa = 1,
12
+ MasterCard = 2,
13
+ AmericanExpress = 3,
14
+ DinersClub = 4,
15
+ Discover = 5,
16
+ JCB = 6,
17
+ PrivateLabel = 7,
18
+ Debit = 8,
19
+ Gift = 9,
20
+ }
21
+ export declare enum PaymentRequestType {
22
+ Sale = 0,
23
+ Refund = 1,
24
+ Void = 2,
25
+ GiftCardActivate = 3,
26
+ GiftCardBalanceInquiry = 4,
27
+ GiftCardIssue = 5,
28
+ GiftCardRedeem = 6,
29
+ PLCCAccountInquiry = 7,
30
+ PLCCAccountPayment = 8,
31
+ PLCCApplication = 9,
32
+ }
33
+ export declare enum ResponseCodes {
34
+ Approved = 0,
35
+ Error = 1,
36
+ Decline = 2,
37
+ Timeout = 3,
38
+ }
39
+ export declare enum StatusCode {
40
+ InitializationComplete = 0,
41
+ InitializationInProgress = 1,
42
+ PaymentComplete = 2,
43
+ PaymentInProgress = 3,
44
+ }
45
+ export declare enum TenderType {
46
+ Unknown = 0,
47
+ Cash = 1,
48
+ PaymentDevice = 2,
49
+ Credit = 3,
50
+ Debit = 4,
51
+ Gift = 5,
52
+ }
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Providers = {
4
+ ADYEN: "Adyen",
5
+ AURUS: "Aurus"
6
+ };
7
+ exports.EventResponseTypes = {
8
+ Authorization: "AuthorizationResponse",
9
+ PaymentDeviceStatus: "PaymentDeviceStatus"
10
+ };
11
+ var CardType;
12
+ (function (CardType) {
13
+ CardType[CardType["Unknown"] = 0] = "Unknown";
14
+ CardType[CardType["Visa"] = 1] = "Visa";
15
+ CardType[CardType["MasterCard"] = 2] = "MasterCard";
16
+ CardType[CardType["AmericanExpress"] = 3] = "AmericanExpress";
17
+ CardType[CardType["DinersClub"] = 4] = "DinersClub";
18
+ CardType[CardType["Discover"] = 5] = "Discover";
19
+ CardType[CardType["JCB"] = 6] = "JCB";
20
+ CardType[CardType["PrivateLabel"] = 7] = "PrivateLabel";
21
+ CardType[CardType["Debit"] = 8] = "Debit";
22
+ CardType[CardType["Gift"] = 9] = "Gift";
23
+ })(CardType = exports.CardType || (exports.CardType = {}));
24
+ ;
25
+ var PaymentRequestType;
26
+ (function (PaymentRequestType) {
27
+ PaymentRequestType[PaymentRequestType["Sale"] = 0] = "Sale";
28
+ PaymentRequestType[PaymentRequestType["Refund"] = 1] = "Refund";
29
+ PaymentRequestType[PaymentRequestType["Void"] = 2] = "Void";
30
+ PaymentRequestType[PaymentRequestType["GiftCardActivate"] = 3] = "GiftCardActivate";
31
+ PaymentRequestType[PaymentRequestType["GiftCardBalanceInquiry"] = 4] = "GiftCardBalanceInquiry";
32
+ PaymentRequestType[PaymentRequestType["GiftCardIssue"] = 5] = "GiftCardIssue";
33
+ PaymentRequestType[PaymentRequestType["GiftCardRedeem"] = 6] = "GiftCardRedeem";
34
+ PaymentRequestType[PaymentRequestType["PLCCAccountInquiry"] = 7] = "PLCCAccountInquiry";
35
+ PaymentRequestType[PaymentRequestType["PLCCAccountPayment"] = 8] = "PLCCAccountPayment";
36
+ PaymentRequestType[PaymentRequestType["PLCCApplication"] = 9] = "PLCCApplication";
37
+ })(PaymentRequestType = exports.PaymentRequestType || (exports.PaymentRequestType = {}));
38
+ ;
39
+ var ResponseCodes;
40
+ (function (ResponseCodes) {
41
+ ResponseCodes[ResponseCodes["Approved"] = 0] = "Approved";
42
+ ResponseCodes[ResponseCodes["Error"] = 1] = "Error";
43
+ ResponseCodes[ResponseCodes["Decline"] = 2] = "Decline";
44
+ ResponseCodes[ResponseCodes["Timeout"] = 3] = "Timeout";
45
+ })(ResponseCodes = exports.ResponseCodes || (exports.ResponseCodes = {}));
46
+ ;
47
+ var StatusCode;
48
+ (function (StatusCode) {
49
+ StatusCode[StatusCode["InitializationComplete"] = 0] = "InitializationComplete";
50
+ StatusCode[StatusCode["InitializationInProgress"] = 1] = "InitializationInProgress";
51
+ StatusCode[StatusCode["PaymentComplete"] = 2] = "PaymentComplete";
52
+ StatusCode[StatusCode["PaymentInProgress"] = 3] = "PaymentInProgress";
53
+ })(StatusCode = exports.StatusCode || (exports.StatusCode = {}));
54
+ var TenderType;
55
+ (function (TenderType) {
56
+ TenderType[TenderType["Unknown"] = 0] = "Unknown";
57
+ TenderType[TenderType["Cash"] = 1] = "Cash";
58
+ TenderType[TenderType["PaymentDevice"] = 2] = "PaymentDevice";
59
+ TenderType[TenderType["Credit"] = 3] = "Credit";
60
+ TenderType[TenderType["Debit"] = 4] = "Debit";
61
+ TenderType[TenderType["Gift"] = 5] = "Gift";
62
+ })(TenderType = exports.TenderType || (exports.TenderType = {}));
63
+ ;
64
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants/constants.ts"],"names":[],"mappings":";;AAAa,QAAA,SAAS,GAAG;IACvB,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;CACf,CAAC;AAEW,QAAA,kBAAkB,GAAG;IAChC,aAAa,EAAE,uBAAuB;IACtC,mBAAmB,EAAE,qBAAqB;CAC3C,CAAC;AAEF,IAAY,QAWX;AAXD,WAAY,QAAQ;IAClB,6CAAO,CAAA;IACP,uCAAI,CAAA;IACJ,mDAAU,CAAA;IACV,6DAAe,CAAA;IACf,mDAAU,CAAA;IACV,+CAAQ,CAAA;IACR,qCAAG,CAAA;IACH,uDAAY,CAAA;IACZ,yCAAK,CAAA;IACL,uCAAI,CAAA;AACN,CAAC,EAXW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAWnB;AAAA,CAAC;AAEF,IAAY,kBAWX;AAXD,WAAY,kBAAkB;IAC5B,2DAAI,CAAA;IACJ,+DAAM,CAAA;IACN,2DAAI,CAAA;IACJ,mFAAgB,CAAA;IAChB,+FAAsB,CAAA;IACtB,6EAAa,CAAA;IACb,+EAAc,CAAA;IACd,uFAAkB,CAAA;IAClB,uFAAkB,CAAA;IAClB,iFAAe,CAAA;AACjB,CAAC,EAXW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAW7B;AAAA,CAAC;AAEF,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,yDAAQ,CAAA;IACR,mDAAK,CAAA;IACL,uDAAO,CAAA;IACP,uDAAO,CAAA;AACT,CAAC,EALW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAKxB;AAAA,CAAC;AAEF,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,+EAAsB,CAAA;IACtB,mFAAwB,CAAA;IACxB,iEAAe,CAAA;IACf,qEAAiB,CAAA;AACnB,CAAC,EALW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAKrB;AAED,IAAY,UAOX;AAPD,WAAY,UAAU;IACpB,iDAAO,CAAA;IACP,2CAAI,CAAA;IACJ,6DAAa,CAAA;IACb,+CAAM,CAAA;IACN,6CAAK,CAAA;IACL,2CAAI,CAAA;AACN,CAAC,EAPW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAOrB;AAAA,CAAC"}
@@ -0,0 +1 @@
1
+ export * from "./constants";
@@ -0,0 +1,7 @@
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("./constants"));
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":";;;;;AAAA,iCAA4B"}
package/lib/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ export * from "./constants";
2
+ export * from "./interfaces";
3
+ export * from "./PaymentDeviceService";
package/lib/index.js ADDED
@@ -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("./constants"));
7
+ __export(require("./PaymentDeviceService"));
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,iCAA4B;AAE5B,4CAAuC"}
@@ -0,0 +1,7 @@
1
+ import { StatusCode } from "../constants";
2
+ export interface IPaymentStatus {
3
+ cardNumber?: string;
4
+ deviceAvailable: boolean;
5
+ status?: string;
6
+ statusCode?: StatusCode;
7
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // TODO: Add support for other devices and expand possible status codes.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=IDeviceStatus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IDeviceStatus.js","sourceRoot":"","sources":["../../src/interfaces/IDeviceStatus.ts"],"names":[],"mappings":";AAAA,wEAAwE"}
@@ -0,0 +1,2 @@
1
+ export * from "./IDeviceStatus";
2
+ export * from "./payment";