@aptos-scp/scp-component-rn-device-services 0.0.1 → 0.0.4-hm
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/android/build.gradle +47 -0
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +5 -0
- package/android/gradlew +164 -0
- package/android/gradlew.bat +90 -0
- package/android/src/main/AndroidManifest.xml +10 -0
- package/android/src/main/java/com/aptos/scp/paymentterminal/RNMapper.java +212 -0
- package/android/src/main/java/com/aptos/scp/paymentterminal/VendorPaymentTerminal.java +46 -0
- package/android/src/main/java/com/aptos/scp/paymentterminal/VendorPaymentTerminalPackage.java +33 -0
- package/android/src/main/java/com/aptos/scp/paymentterminal/adyen/AdyenPaymentTerminal.java +122 -0
- package/android/src/main/java/com/aptos/scp/paymentterminal/aurus/AurusPaymentTerminal.java +54 -0
- package/ios/AurusEnterpriseSDK.framework/AurusEnterpriseSDK +0 -0
- package/ios/AurusEnterpriseSDK.framework/Headers/AurusEnterpriseSDK.h +97 -95
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit +0 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/Info.plist +0 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/adyentoolkit.momd/VersionInfo.plist +0 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/adyentoolkit.momd/adyentoolkit v1.10.2.mom +0 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/adyentoolkit.momd/adyentoolkit v1.10.3.mom +0 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/adyentoolkit.momd/adyentoolkit v1.10.4.mom +0 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/adyentoolkit.momd/adyentoolkit v1.10.4.omo +0 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/adyentoolkit.momd/adyentoolkit v1.10.mom +0 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/adyentoolkit.momd/adyentoolkit v1.8.6.mom +0 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/adyentoolkit.momd/adyentoolkit v1.9.mom +0 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/AdyenToolkit.bundle/adyentoolkit.momd/adyentoolkit.mom +0 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYAccountData.h +26 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYAdditionalDataRequest.h +38 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYAmount.h +16 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYAppData.h +26 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYBalance.h +13 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYCashTransactionRequest.h +35 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYConstants.h +688 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYCurrency.h +33 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYDevice.h +308 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYDeviceData.h +52 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYDeviceManagerDelegate.h +66 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYDeviceRegistry.h +125 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYDynamicCurrencyConversionData.h +22 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYErrors.h +153 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYGiftCard.h +41 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYGiftCardBalanceRequest.h +50 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYGiftCardBalanceResponse.h +38 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYGiftCardLoadRequest.h +78 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYGiftCardLoadRequestDelegate.h +25 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYGiftCardLoadResponse.h +31 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYGiftCardMask.h +31 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYGiftCardRequest.h +13 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYLocationManager.h +14 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYLoginDelegate.h +80 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYPrintReceiptRequest.h +57 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYReceipt.h +33 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYReceiptLine.h +92 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYReferralRequest.h +16 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYRefundData.h +54 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYServerSynchronization.h +18 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYSignatureRequest.h +117 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYSpecialTransactionRequest.h +63 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYToneGenerator.h +45 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYTransactionData.h +416 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYTransactionDetails.h +45 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYTransactionProcessorDelegate.h +279 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYTransactionRequest.h +108 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/ADYUIKit.h +30 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/Adyen.h +591 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/AdyenToolkit-umbrella.h +59 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/AdyenToolkit.h +79 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/NSData+ADY.h +31 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/NSString+ADY.h +19 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Headers/adylog.h +176 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Info.plist +0 -0
- package/ios/Frameworks/Adyen/AdyenToolkit.framework/Modules/module.modulemap +6 -0
- package/ios/SCPRNDeviceServices/Adyen/AdyenConstants.h +40 -0
- package/ios/SCPRNDeviceServices/Adyen/AdyenConstants.m +28 -0
- package/ios/SCPRNDeviceServices/Adyen/AdyenDelegate.h +23 -0
- package/ios/SCPRNDeviceServices/Adyen/AdyenDelegate.m +15 -0
- package/ios/SCPRNDeviceServices/Adyen/AdyenDeviceManagerDelegate.h +19 -0
- package/ios/SCPRNDeviceServices/Adyen/AdyenDeviceManagerDelegate.m +31 -0
- package/ios/SCPRNDeviceServices/Adyen/AdyenLoginDelegate.h +19 -0
- package/ios/SCPRNDeviceServices/Adyen/AdyenLoginDelegate.m +26 -0
- package/ios/SCPRNDeviceServices/Adyen/AdyenTransactionProcessorDelegate.h +26 -0
- package/ios/SCPRNDeviceServices/Adyen/AdyenTransactionProcessorDelegate.m +148 -0
- package/ios/SCPRNDeviceServices/AdyenPaymentTerminal.h +19 -0
- package/ios/SCPRNDeviceServices/AdyenPaymentTerminal.m +457 -22
- package/ios/SCPRNDeviceServices/AurusPaymentTerminal.m +96 -11
- package/ios/SCPRNDeviceServices/VendorPaymentTerminal.m +1 -1
- package/ios/SCPRNDeviceServices.xcodeproj/project.pbxproj +56 -0
- package/lib/AdyenDevice/AdyenDevice.d.ts +56 -0
- package/lib/AdyenDevice/AdyenDevice.js +349 -0
- package/lib/AdyenDevice/AdyenDevice.js.map +1 -0
- package/lib/AdyenDevice/constants.d.ts +12 -0
- package/lib/AdyenDevice/constants.js +228 -0
- package/lib/AdyenDevice/constants.js.map +1 -0
- package/lib/AdyenDevice/index.d.ts +1 -0
- package/lib/AdyenDevice/index.js +7 -0
- package/lib/AdyenDevice/index.js.map +1 -0
- package/lib/AdyenDevice/interfaces.d.ts +175 -0
- package/lib/AdyenDevice/interfaces.js +3 -0
- package/lib/AdyenDevice/interfaces.js.map +1 -0
- package/lib/AurusDevice/AurusDevice.d.ts +102 -0
- package/lib/AurusDevice/AurusDevice.js +730 -0
- package/lib/AurusDevice/AurusDevice.js.map +1 -0
- package/lib/AurusDevice/constants.d.ts +85 -33
- package/lib/AurusDevice/constants.js +115 -37
- package/lib/AurusDevice/constants.js.map +1 -1
- package/lib/AurusDevice/index.d.ts +1 -1
- package/lib/AurusDevice/index.js +1 -1
- package/lib/AurusDevice/index.js.map +1 -1
- package/lib/AurusDevice/sdk-interface/AESDKRegistration.d.ts +10 -9
- package/lib/AurusDevice/sdk-interface/AESDKRegistration.js +0 -6
- package/lib/AurusDevice/sdk-interface/AESDKRegistration.js.map +1 -1
- package/lib/AurusDevice/sdk-interface/AurusPaymentSupport.d.ts +5 -5
- package/lib/AurusDevice/sdk-interface/AurusPaymentSupport.js +143 -107
- package/lib/AurusDevice/sdk-interface/AurusPaymentSupport.js.map +1 -1
- package/lib/AurusDevice/sdk-interface/Barcode.d.ts +16 -0
- package/lib/AurusDevice/sdk-interface/Barcode.js +3 -0
- package/lib/AurusDevice/sdk-interface/Barcode.js.map +1 -0
- package/lib/AurusDevice/sdk-interface/ByPassScreen.d.ts +25 -0
- package/lib/AurusDevice/sdk-interface/ByPassScreen.js +9 -0
- package/lib/AurusDevice/sdk-interface/ByPassScreen.js.map +1 -0
- package/lib/AurusDevice/sdk-interface/CancelTransaction.d.ts +11 -10
- package/lib/AurusDevice/sdk-interface/CancelTransaction.js +0 -6
- package/lib/AurusDevice/sdk-interface/CancelTransaction.js.map +1 -1
- package/lib/AurusDevice/sdk-interface/GetCardBinRequest.d.ts +14 -12
- package/lib/AurusDevice/sdk-interface/PLCCApplication.d.ts +12 -11
- package/lib/AurusDevice/sdk-interface/PLCCApplication.js +0 -6
- package/lib/AurusDevice/sdk-interface/PLCCApplication.js.map +1 -1
- package/lib/AurusDevice/sdk-interface/TransactionRequest.d.ts +44 -48
- package/lib/AurusDevice/sdk-interface/TransactionRequest.js +0 -6
- package/lib/AurusDevice/sdk-interface/TransactionRequest.js.map +1 -1
- package/lib/AurusDevice/sdk-interface/Upgrade.d.ts +23 -0
- package/lib/AurusDevice/sdk-interface/Upgrade.js +9 -0
- package/lib/AurusDevice/sdk-interface/Upgrade.js.map +1 -0
- package/lib/AurusDevice/sdk-interface/XmlElementString.d.ts +3 -0
- package/lib/AurusDevice/sdk-interface/XmlElementString.js +3 -0
- package/lib/AurusDevice/sdk-interface/XmlElementString.js.map +1 -0
- package/lib/AurusDevice/sdk-interface/index.d.ts +3 -0
- package/lib/PaymentDeviceFactory.d.ts +5 -5
- package/lib/PaymentDeviceFactory.js +16 -22
- package/lib/PaymentDeviceFactory.js.map +1 -1
- package/lib/PaymentDeviceService.d.ts +13 -12
- package/lib/PaymentDeviceService.js +114 -71
- package/lib/PaymentDeviceService.js.map +1 -1
- package/lib/ScannerDeviceFactory.d.ts +11 -0
- package/lib/ScannerDeviceFactory.js +27 -0
- package/lib/ScannerDeviceFactory.js.map +1 -0
- package/lib/ScannerDeviceService.d.ts +13 -0
- package/lib/ScannerDeviceService.js +110 -0
- package/lib/ScannerDeviceService.js.map +1 -0
- package/lib/configs/inversify/inversify.config.d.ts +3 -0
- package/lib/configs/inversify/inversify.config.js +15 -0
- package/lib/configs/inversify/inversify.config.js.map +1 -0
- package/lib/constants/constants.d.ts +62 -38
- package/lib/constants/constants.js +64 -42
- package/lib/constants/constants.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/interfaces/IDeviceStatus.d.ts +1 -0
- package/lib/interfaces/index.d.ts +1 -0
- package/lib/interfaces/payment/IPayment.d.ts +17 -18
- package/lib/interfaces/payment/messages/requests.d.ts +2 -3
- package/lib/interfaces/payment/messages/responses.d.ts +13 -6
- package/lib/interfaces/scanner/IScanner.d.ts +23 -0
- package/lib/interfaces/scanner/IScanner.js +3 -0
- package/lib/interfaces/scanner/IScanner.js.map +1 -0
- package/lib/interfaces/scanner/index.d.ts +1 -0
- package/lib/interfaces/scanner/index.js +3 -0
- package/lib/interfaces/scanner/index.js.map +1 -0
- package/package.json +12 -9
- package/types/react-native-xml2js/index.d.ts +5 -0
- package/lib/AurusDevice/AurusPaymentDevice.d.ts +0 -77
- package/lib/AurusDevice/AurusPaymentDevice.js +0 -473
- package/lib/AurusDevice/AurusPaymentDevice.js.map +0 -1
- package/types/money-works/index.d.ts +0 -49
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
import Money = require("money-works");
|
|
1
|
+
import { Money } from "@aptos-scp/scp-component-business-core";
|
|
3
2
|
import { IPLCCData } from "../../";
|
|
4
|
-
import { CardType, PaymentRequestType, ResponseCodes, TenderType } from "../../../constants/constants";
|
|
3
|
+
import { CardType, EntryMethod, PaymentRequestType, ResponseCodes, TenderType } from "../../../constants/constants";
|
|
5
4
|
export interface IEMVData {
|
|
6
5
|
AID?: string;
|
|
6
|
+
ARC?: string;
|
|
7
7
|
CEM?: string;
|
|
8
8
|
CVM?: string;
|
|
9
9
|
TVR?: string;
|
|
@@ -13,6 +13,11 @@ export interface IEMVData {
|
|
|
13
13
|
appLabel?: string;
|
|
14
14
|
tranCert?: string;
|
|
15
15
|
additionalData?: string;
|
|
16
|
+
merchantId?: string;
|
|
17
|
+
terminalId?: string;
|
|
18
|
+
respDate?: string;
|
|
19
|
+
respTime?: string;
|
|
20
|
+
receiptData?: string[];
|
|
16
21
|
}
|
|
17
22
|
export interface IDCCData {
|
|
18
23
|
foreignAmount?: string;
|
|
@@ -22,11 +27,12 @@ export interface IDCCData {
|
|
|
22
27
|
}
|
|
23
28
|
export interface ICoreResponse {
|
|
24
29
|
cardNumber?: string;
|
|
30
|
+
paymentEnvironment?: string;
|
|
25
31
|
responseCode?: ResponseCodes;
|
|
26
32
|
status?: string;
|
|
27
33
|
}
|
|
28
34
|
export interface IGiftCardResponse extends ICoreResponse {
|
|
29
|
-
balance?:
|
|
35
|
+
balance?: Money;
|
|
30
36
|
}
|
|
31
37
|
export interface IBankCardResponse extends ICoreResponse {
|
|
32
38
|
amount?: Money;
|
|
@@ -35,12 +41,13 @@ export interface IBankCardResponse extends ICoreResponse {
|
|
|
35
41
|
cardType?: CardType;
|
|
36
42
|
cardUsage?: string;
|
|
37
43
|
customerName?: string;
|
|
38
|
-
entryMethod?:
|
|
44
|
+
entryMethod?: EntryMethod;
|
|
39
45
|
offlineToken?: string;
|
|
46
|
+
pinCaptured?: boolean;
|
|
40
47
|
plccData?: IPLCCData;
|
|
41
48
|
rawResponseData?: string;
|
|
42
49
|
receiptData?: string[];
|
|
43
|
-
requestType?: PaymentRequestType
|
|
50
|
+
requestType?: PaymentRequestType;
|
|
44
51
|
signatureData?: string;
|
|
45
52
|
signatureRequired?: boolean;
|
|
46
53
|
tenderType?: TenderType;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { EventEmitter } from "fbemitter";
|
|
2
|
+
export interface IScanDataNotification {
|
|
3
|
+
data: string;
|
|
4
|
+
encoding: string;
|
|
5
|
+
}
|
|
6
|
+
export interface IScannerDeviceCommon {
|
|
7
|
+
}
|
|
8
|
+
export interface IScannerDeviceService extends IScannerDeviceCommon {
|
|
9
|
+
initialize(emitter: EventEmitter, configs: any): Promise<void>;
|
|
10
|
+
start(): Promise<void>;
|
|
11
|
+
stop(): Promise<void>;
|
|
12
|
+
tearDown(): Promise<void>;
|
|
13
|
+
enable(): Promise<void>;
|
|
14
|
+
disable(): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
export interface IVendorScannerDevice extends IScannerDeviceCommon {
|
|
17
|
+
configureScannerDevice(emitter: EventEmitter, config: any): Promise<void>;
|
|
18
|
+
startScannerDevice(): Promise<void>;
|
|
19
|
+
stopScannerDevice(): Promise<void>;
|
|
20
|
+
tearDownScannerDevice(): Promise<void>;
|
|
21
|
+
enableScannerDevice(): Promise<void>;
|
|
22
|
+
disableScannerDevice(): Promise<void>;
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IScanner.js","sourceRoot":"","sources":["../../../src/interfaces/scanner/IScanner.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./IScanner";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/interfaces/scanner/index.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aptos-scp/scp-component-rn-device-services",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4-hm",
|
|
4
4
|
"description": "A react-native component for integrating with devices.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"repository": {
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"registry": "https://registry.npmjs.com/"
|
|
12
12
|
},
|
|
13
13
|
"files": [
|
|
14
|
+
"android",
|
|
14
15
|
"constants",
|
|
15
16
|
"interfaces",
|
|
16
17
|
"ios",
|
|
@@ -45,14 +46,19 @@
|
|
|
45
46
|
},
|
|
46
47
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
47
48
|
"dependencies": {
|
|
48
|
-
"@aptos-scp/scp-component-logging": "^0.3.1",
|
|
49
49
|
"@types/big.js": "0.0.31",
|
|
50
50
|
"fbemitter": "2.1.1",
|
|
51
51
|
"inversify": "4.1.1",
|
|
52
|
-
"
|
|
53
|
-
|
|
52
|
+
"xml-js": "1.6.2"
|
|
53
|
+
},
|
|
54
|
+
"peerDependencies": {
|
|
55
|
+
"@aptos-scp/scp-component-business-core": ">=0.3.x <0.4.0",
|
|
56
|
+
"@aptos-scp/scp-component-logging": ">=0.4.x <0.5.0",
|
|
57
|
+
"react-native": ">=0.40.x <=0.44.x"
|
|
54
58
|
},
|
|
55
59
|
"devDependencies": {
|
|
60
|
+
"@aptos-scp/scp-component-business-core": "~0.3.0",
|
|
61
|
+
"@aptos-scp/scp-component-logging": "~0.4.5",
|
|
56
62
|
"@types/chai": "3.5.2",
|
|
57
63
|
"@types/chai-as-promised": "0.0.30",
|
|
58
64
|
"@types/fbemitter": "2.0.32",
|
|
@@ -70,15 +76,12 @@
|
|
|
70
76
|
"react": "16.0.0-alpha.6",
|
|
71
77
|
"react-native": "0.44.2",
|
|
72
78
|
"react-native-mock": "0.3.1",
|
|
73
|
-
"remap-istanbul": "0.9.
|
|
79
|
+
"remap-istanbul": "0.9.6",
|
|
74
80
|
"rimraf": "2.6.1",
|
|
75
81
|
"sinon": "2.3.6",
|
|
76
82
|
"sinon-chai": "2.11.0",
|
|
77
83
|
"source-map-support": "0.4.15",
|
|
78
84
|
"tslint": "^4.4.2",
|
|
79
|
-
"typescript": "2.
|
|
80
|
-
},
|
|
81
|
-
"peerDependencies": {
|
|
82
|
-
"react-native": ">=0.40.x <=0.44.x"
|
|
85
|
+
"typescript": "2.4.0"
|
|
83
86
|
}
|
|
84
87
|
}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
export declare class Parser {
|
|
2
|
+
constructor(opts?: any);
|
|
2
3
|
public assignOrPush(obj: any, key: any, newValue: any): any;
|
|
3
4
|
public parseString(xml: string, callback: any): any;
|
|
4
5
|
public processAsync(): any;
|
|
5
6
|
public reset(): void;
|
|
6
7
|
}
|
|
8
|
+
|
|
9
|
+
export declare class Builder {
|
|
10
|
+
public buildObject(rootObj:any): any;
|
|
11
|
+
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from "fbemitter";
|
|
2
|
-
import { EmitterSubscription, NativeEventEmitter } from "react-native";
|
|
3
|
-
import { IAuthorizationContext, IBankCardRequest, IGiftCardRequest, IPaymentDeviceConfiguration } from "../";
|
|
4
|
-
import { IPaymentDevice } from "../interfaces/payment/IPayment";
|
|
5
|
-
/**
|
|
6
|
-
* This is the interface that the native (bridge) class implements.
|
|
7
|
-
*
|
|
8
|
-
* Note: any changes to the native API must be reflected here and vice-versa.
|
|
9
|
-
*/
|
|
10
|
-
export interface INativeAurusPaymentTerminal {
|
|
11
|
-
initialize(): void;
|
|
12
|
-
OnAESDKProcessRequest(WithRequest: string): void;
|
|
13
|
-
}
|
|
14
|
-
export declare class AurusPaymentDevice implements IPaymentDevice {
|
|
15
|
-
protected _devicePaymentTerminal: INativeAurusPaymentTerminal;
|
|
16
|
-
protected _deviceNotificationEmitter: EventEmitter;
|
|
17
|
-
protected _deviceSubscriptions: EmitterSubscription[];
|
|
18
|
-
protected _nativeEventEmitter: NativeEventEmitter;
|
|
19
|
-
private _initInProgress;
|
|
20
|
-
private _registrationInProgress;
|
|
21
|
-
/**
|
|
22
|
-
* To avoid pushing native component awareness onto the rest of the app, the native objects
|
|
23
|
-
* are created in the constructor, which only accepts JavaScript parameters.
|
|
24
|
-
*
|
|
25
|
-
* @param {EventEmitter} deviceNotificationEmitter
|
|
26
|
-
*/
|
|
27
|
-
constructor(paymentConfig: IPaymentDeviceConfiguration, deviceNotificationEmitter: EventEmitter);
|
|
28
|
-
initialize(): Promise<void>;
|
|
29
|
-
start(): Promise<void>;
|
|
30
|
-
captureSale(authRequest: IBankCardRequest): Promise<IAuthorizationContext>;
|
|
31
|
-
captureRefund(authRequest: IBankCardRequest): Promise<IAuthorizationContext>;
|
|
32
|
-
giftcardActivate(authRequest: IGiftCardRequest): Promise<IAuthorizationContext>;
|
|
33
|
-
giftcardBalance(authRequest: IGiftCardRequest): Promise<IAuthorizationContext>;
|
|
34
|
-
giftcardIssue(authRequest: IGiftCardRequest): Promise<IAuthorizationContext>;
|
|
35
|
-
giftcardRedeem(authRequest: IGiftCardRequest): Promise<IAuthorizationContext>;
|
|
36
|
-
void(authRequest: IBankCardRequest): Promise<IAuthorizationContext>;
|
|
37
|
-
stop(): Promise<void>;
|
|
38
|
-
tearDown(): Promise<void>;
|
|
39
|
-
processTimeout(): Promise<void>;
|
|
40
|
-
private authorize(authRequest);
|
|
41
|
-
private sendResponse(authResponse, event?);
|
|
42
|
-
/**
|
|
43
|
-
* This method handles events published by the native components. This is an adapter between the native and JavaScript
|
|
44
|
-
* components for asynchronous events from the native layer.
|
|
45
|
-
*
|
|
46
|
-
* @param args
|
|
47
|
-
* @return {any}
|
|
48
|
-
*/
|
|
49
|
-
private onAESDKResponse(...args);
|
|
50
|
-
private sendCancelTranRequest();
|
|
51
|
-
private sendCancelLastTranRequest();
|
|
52
|
-
private sendTransRequest(getCardBinResp);
|
|
53
|
-
private sendCardTransRequest();
|
|
54
|
-
/**
|
|
55
|
-
* Sends a GetCardBinRequest to request card data from teh device
|
|
56
|
-
* @param authRequest
|
|
57
|
-
*/
|
|
58
|
-
private sendGetCardBin(authRequest);
|
|
59
|
-
/**
|
|
60
|
-
* Sends an AESDKRegistrationRequest to register the device
|
|
61
|
-
* @param authRequest
|
|
62
|
-
*/
|
|
63
|
-
private sendAESDKRegistration(authRequest);
|
|
64
|
-
private handleAESDKResponse(xml);
|
|
65
|
-
private convertXmlToJs(xml);
|
|
66
|
-
private processResponse(response);
|
|
67
|
-
private processTrans(response);
|
|
68
|
-
private processGetCardBin(response);
|
|
69
|
-
private processCancelTrans(response);
|
|
70
|
-
private processAESDKRegistration(response);
|
|
71
|
-
private processAESDK(response);
|
|
72
|
-
private mapAurusResponseCode(responseCode);
|
|
73
|
-
private mapAurusCardType(aurusCardType);
|
|
74
|
-
private mapAurusTenderType(aurusCardType);
|
|
75
|
-
private parseEMVData(data);
|
|
76
|
-
private parseEMVField(field, emvData);
|
|
77
|
-
}
|