globalpayments-api 3.10.14 → 3.10.15
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/CHANGELOG.md +246 -240
- package/LICENSE.md +257 -257
- package/README.md +148 -148
- package/appsec.properties +8 -0
- package/lib/src/Builders/RequestBuilder/GpApi/GpApiSessionInfo.d.ts +11 -2
- package/lib/src/Builders/RequestBuilder/GpApi/GpApiSessionInfo.js +44 -5
- package/lib/src/Builders/RequestBuilder/GpApi/GpApiSessionInfo.js.map +1 -1
- package/lib/src/Entities/GpApi/PorticoTokenConfig.d.ts +25 -0
- package/lib/src/Entities/GpApi/PorticoTokenConfig.js +30 -0
- package/lib/src/Entities/GpApi/PorticoTokenConfig.js.map +1 -0
- package/lib/src/Entities/GpApi/index.d.ts +1 -0
- package/lib/src/Entities/GpApi/index.js +1 -0
- package/lib/src/Entities/GpApi/index.js.map +1 -1
- package/lib/src/Entities/Transaction.d.ts +2 -0
- package/lib/src/Entities/Transaction.js +2 -0
- package/lib/src/Entities/Transaction.js.map +1 -1
- package/lib/src/Entities/TransactionSummary.d.ts +1 -0
- package/lib/src/Entities/TransactionSummary.js +1 -0
- package/lib/src/Entities/TransactionSummary.js.map +1 -1
- package/lib/src/Entities/UPA/ExtraChargeType.d.ts +8 -0
- package/lib/src/Entities/UPA/ExtraChargeType.js +13 -0
- package/lib/src/Entities/UPA/ExtraChargeType.js.map +1 -0
- package/lib/src/Entities/UPA/Lodging.d.ts +11 -0
- package/lib/src/Entities/UPA/Lodging.js +15 -0
- package/lib/src/Entities/UPA/Lodging.js.map +1 -0
- package/lib/src/Entities/UPA/POSData.d.ts +6 -0
- package/lib/src/Entities/UPA/POSData.js +11 -0
- package/lib/src/Entities/UPA/POSData.js.map +1 -0
- package/lib/src/Gateways/GpApiConnector.js +21 -2
- package/lib/src/Gateways/GpApiConnector.js.map +1 -1
- package/lib/src/Gateways/PorticoConnector.js +2 -0
- package/lib/src/Gateways/PorticoConnector.js.map +1 -1
- package/lib/src/Mapping/GpApiMapping.js +7 -0
- package/lib/src/Mapping/GpApiMapping.js.map +1 -1
- package/lib/src/ServiceConfigs/Gateways/GpApiConfig.d.ts +6 -0
- package/lib/src/ServiceConfigs/Gateways/GpApiConfig.js +25 -2
- package/lib/src/ServiceConfigs/Gateways/GpApiConfig.js.map +1 -1
- package/lib/src/Services/GpApiServices.js +4 -1
- package/lib/src/Services/GpApiServices.js.map +1 -1
- package/lib/src/Terminals/Builders/TerminalReportBuilder.d.ts +15 -0
- package/lib/src/Terminals/Builders/TerminalReportBuilder.js +49 -0
- package/lib/src/Terminals/Builders/TerminalReportBuilder.js.map +1 -0
- package/lib/src/Terminals/UPA/Entities/UpaModels.d.ts +62 -0
- package/lib/src/Terminals/UPA/Entities/UpaModels.js +28 -0
- package/lib/src/Terminals/UPA/Entities/UpaModels.js.map +1 -0
- package/lib/src/Terminals/UPA/Entities/UpaSearchCriteria.d.ts +5 -0
- package/lib/src/Terminals/UPA/Entities/UpaSearchCriteria.js +10 -0
- package/lib/src/Terminals/UPA/Entities/UpaSearchCriteria.js.map +1 -0
- package/lib/src/Terminals/UPA/Reponses/BatchList.d.ts +16 -0
- package/lib/src/Terminals/UPA/Reponses/BatchList.js +82 -0
- package/lib/src/Terminals/UPA/Reponses/BatchList.js.map +1 -0
- package/lib/src/Terminals/UPA/Reponses/BatchReportResponse.d.ts +55 -0
- package/lib/src/Terminals/UPA/Reponses/BatchReportResponse.js +213 -0
- package/lib/src/Terminals/UPA/Reponses/BatchReportResponse.js.map +1 -0
- package/lib/src/Terminals/UPA/Reponses/OpenTabDetailsResponse.d.ts +25 -0
- package/lib/src/Terminals/UPA/Reponses/OpenTabDetailsResponse.js +109 -0
- package/lib/src/Terminals/UPA/Reponses/OpenTabDetailsResponse.js.map +1 -0
- package/lib/src/Terminals/UPA/Reponses/SafReportResponse.d.ts +36 -0
- package/lib/src/Terminals/UPA/Reponses/SafReportResponse.js +181 -0
- package/lib/src/Terminals/UPA/Reponses/SafReportResponse.js.map +1 -0
- package/lib/src/Terminals/UPA/Reponses/UpaEODResponse.d.ts +21 -0
- package/lib/src/Terminals/UPA/Reponses/UpaEODResponse.js +106 -0
- package/lib/src/Terminals/UPA/Reponses/UpaEODResponse.js.map +1 -0
- package/lib/src/Terminals/UPA/Reponses/UpaGiftCardResponse.d.ts +41 -0
- package/lib/src/Terminals/UPA/Reponses/UpaGiftCardResponse.js +93 -0
- package/lib/src/Terminals/UPA/Reponses/UpaGiftCardResponse.js.map +1 -0
- package/lib/src/Terminals/UPA/Reponses/UpaSAFResponse.d.ts +35 -0
- package/lib/src/Terminals/UPA/Reponses/UpaSAFResponse.js +194 -0
- package/lib/src/Terminals/UPA/Reponses/UpaSAFResponse.js.map +1 -0
- package/lib/src/Terminals/UPA/Reponses/UpaSignatureResponse.d.ts +18 -0
- package/lib/src/Terminals/UPA/Reponses/UpaSignatureResponse.js +94 -0
- package/lib/src/Terminals/UPA/Reponses/UpaSignatureResponse.js.map +1 -0
- package/lib/test/Integration/Gateways/GpApiConnector/3DS2.test.js +15 -15
- package/lib/test/Integration/Gateways/GpApiConnector/3DSecure.test.js +5 -5
- package/lib/test/Integration/Gateways/GpApiConnector/AccessTokenPorticoCredentials.test.d.ts +1 -0
- package/lib/test/Integration/Gateways/GpApiConnector/AccessTokenPorticoCredentials.test.js +175 -0
- package/lib/test/Integration/Gateways/GpApiConnector/AccessTokenPorticoCredentials.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpApiConnector/GpApiCreateTokenWithPorticoCredentialTests.test.d.ts +1 -0
- package/lib/test/Integration/Gateways/GpApiConnector/GpApiCreateTokenWithPorticoCredentialTests.test.js +205 -0
- package/lib/test/Integration/Gateways/GpApiConnector/GpApiCreateTokenWithPorticoCredentialTests.test.js.map +1 -0
- package/lib/test/Integration/Gateways/GpEcomConnector/Credit.test.js +4 -4
- package/lib/test/Integration/Gateways/PorticoConnector/Ecommerce.test.js +8 -8
- package/lib/test/Integration/Gateways/PorticoConnector/GlobalTransactionId.test.d.ts +1 -0
- package/lib/test/Integration/Gateways/PorticoConnector/GlobalTransactionId.test.js +243 -0
- package/lib/test/Integration/Gateways/PorticoConnector/GlobalTransactionId.test.js.map +1 -0
- package/lib/test/Unit/Builders/AuthorizationBuilder/SupplementaryData.test.d.ts +1 -0
- package/lib/test/Unit/Builders/AuthorizationBuilder/SupplementaryData.test.js +147 -0
- package/lib/test/Unit/Builders/AuthorizationBuilder/SupplementaryData.test.js.map +1 -0
- package/lib/test/Unit/Terminals/UPA/UpaStory1Methods.test.d.ts +1 -0
- package/lib/test/Unit/Terminals/UPA/UpaStory1Methods.test.js +250 -0
- package/lib/test/Unit/Terminals/UPA/UpaStory1Methods.test.js.map +1 -0
- package/lib/test/Unit/Terminals/UPA/UpaStory2Methods.test.d.ts +1 -0
- package/lib/test/Unit/Terminals/UPA/UpaStory2Methods.test.js +1277 -0
- package/lib/test/Unit/Terminals/UPA/UpaStory2Methods.test.js.map +1 -0
- package/lib/test/Unit/Terminals/UPA/UpaStory3_4Methods.test.d.ts +1 -0
- package/lib/test/Unit/Terminals/UPA/UpaStory3_4Methods.test.js +411 -0
- package/lib/test/Unit/Terminals/UPA/UpaStory3_4Methods.test.js.map +1 -0
- package/package.json +63 -63
package/README.md
CHANGED
|
@@ -1,148 +1,148 @@
|
|
|
1
|
-
<a href="https://github.com/globalpayments" target="_blank">
|
|
2
|
-
<img src="https://globalpayments.github.io/images/globapaymentsLogo.png" alt="Global Payments logo" title="Global Payments" align="right" width="225" />
|
|
3
|
-
</a>
|
|
4
|
-
|
|
5
|
-
# Global Payments Node.js SDK
|
|
6
|
-
|
|
7
|
-
This SDK makes it easy to integrate your Node.js application with our Card Not Present and Card Present APIs.
|
|
8
|
-
|
|
9
|
-
## Solutions
|
|
10
|
-
|
|
11
|
-
### General / Omnichannel
|
|
12
|
-
|
|
13
|
-
* API Payment Processing
|
|
14
|
-
* Apple Pay & Google Pay
|
|
15
|
-
* Secure Card Storage & Customer Management
|
|
16
|
-
* Subscriptions / Recurring Billing Solutions
|
|
17
|
-
* Credit, Debit, Gift & Loyalty, and eCheck/ACH
|
|
18
|
-
|
|
19
|
-
### Card Not Present (Ecommerce & MOTO) Specific
|
|
20
|
-
|
|
21
|
-
* Minimize PCI compliance requirements with Hosted Payment Solutions
|
|
22
|
-
* 140+ Authorization Currencies & 16 Settlement Currencies
|
|
23
|
-
* 150+ Local Payment Methods Worldwide
|
|
24
|
-
* Account Updater
|
|
25
|
-
* Inbuilt Fraud Prevention Rules
|
|
26
|
-
* 3D Secure, AVS and CVV Checks
|
|
27
|
-
* 260+ Global Enterprise Fraud Rules
|
|
28
|
-
|
|
29
|
-
### Card Present (Terminal & POS) Specific
|
|
30
|
-
|
|
31
|
-
* Secure End-To-End Encryption
|
|
32
|
-
|
|
33
|
-
## Requirements
|
|
34
|
-
|
|
35
|
-
* Node.js
|
|
36
|
-
|
|
37
|
-
## Installation
|
|
38
|
-
|
|
39
|
-
Installing the SDK into your solution is usually be done by either using NPM or Yarn.
|
|
40
|
-
|
|
41
|
-
To install via [NPM](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
|
|
42
|
-
|
|
43
|
-
```
|
|
44
|
-
npm install --save globalpayments-api
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
To install via [Yarn](https://yarnpkg.com/lang/en/docs/installing-dependencies/):
|
|
48
|
-
|
|
49
|
-
```
|
|
50
|
-
yarn add globalpayments-api
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
## Documentation and Examples
|
|
54
|
-
|
|
55
|
-
You can find the latest SDK documentation along with code examples and test cards on
|
|
56
|
-
the [Global Payments](https://developer.globalpay.com) Developer Hub.
|
|
57
|
-
|
|
58
|
-
In addition you can find working examples in the our example code repository.
|
|
59
|
-
|
|
60
|
-
_Quick Tip_: The included [test suite](https://github.com/globalpayments/node-sdk/tree/master/test) can be a great
|
|
61
|
-
source of code samples for using the SDK!
|
|
62
|
-
|
|
63
|
-
#### Process a Payment Example
|
|
64
|
-
|
|
65
|
-
```javascript
|
|
66
|
-
const card = new CreditCardData();
|
|
67
|
-
card.number = "4111111111111111";
|
|
68
|
-
card.expMonth = "12";
|
|
69
|
-
card.expYear = "2025";
|
|
70
|
-
card.cvn = "123";
|
|
71
|
-
|
|
72
|
-
card
|
|
73
|
-
.charge(129.99)
|
|
74
|
-
.withCurrency("EUR")
|
|
75
|
-
.execute()
|
|
76
|
-
.then((response) => {
|
|
77
|
-
const result = response.responseCode;
|
|
78
|
-
const message = response.responseMessage;
|
|
79
|
-
})
|
|
80
|
-
.catch((e) => {
|
|
81
|
-
// handle errors
|
|
82
|
-
});
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
#### Test Card Data
|
|
86
|
-
|
|
87
|
-
| Name | Number | Exp Month | Exp Year | CVN |
|
|
88
|
-
|-------------|------------------|-----------|----------|------|
|
|
89
|
-
| Visa | 4263970000005262 | 12 | 2025 | 123 |
|
|
90
|
-
| MasterCard | 2223000010005780 | 12 | 2019 | 900 |
|
|
91
|
-
| MasterCard | 5425230000004415 | 12 | 2025 | 123 |
|
|
92
|
-
| Discover | 6011000000000087 | 12 | 2025 | 123 |
|
|
93
|
-
| Amex | 374101000000608 | 12 | 2025 | 1234 |
|
|
94
|
-
| JCB | 3566000000000000 | 12 | 2025 | 123 |
|
|
95
|
-
| Diners Club | 36256000000725 | 12 | 2025 | 123 |
|
|
96
|
-
|
|
97
|
-
#### Testing Exceptions
|
|
98
|
-
|
|
99
|
-
During your integration you will want to test for specific issuer responses such as 'Card Declined'. Because our sandbox
|
|
100
|
-
environments do not actually reach out to issuing banks for authorizations, there are specific transaction amounts
|
|
101
|
-
and/or card numbers that will trigger gateway and issuing bank responses. Please contact your support representative for
|
|
102
|
-
a complete listing of values used to simulate transaction AVS/CVV results, declines, errors, and other responses that
|
|
103
|
-
can be caught in your code. Example error handling code:
|
|
104
|
-
|
|
105
|
-
```javascript
|
|
106
|
-
card
|
|
107
|
-
.charge(-5)
|
|
108
|
-
.withCurrency("USD")
|
|
109
|
-
.withAddress(address)
|
|
110
|
-
.execute()
|
|
111
|
-
.catch((e) => {
|
|
112
|
-
switch (e.name) {
|
|
113
|
-
case BuilderError.constructor.name:
|
|
114
|
-
// handle builder errors
|
|
115
|
-
break;
|
|
116
|
-
case ConfigurationError.constructor.name:
|
|
117
|
-
// handle errors related to your services configuration
|
|
118
|
-
break;
|
|
119
|
-
case GatewayError.constructor.name:
|
|
120
|
-
// handle gateway errors/exceptions
|
|
121
|
-
break;
|
|
122
|
-
case UnsupportedTransactionError.constructor.name:
|
|
123
|
-
// handle errors when the configured gateway doesn't support
|
|
124
|
-
// desired transaction
|
|
125
|
-
break;
|
|
126
|
-
case ApiError.constructor.name:
|
|
127
|
-
default:
|
|
128
|
-
// handle all other errors
|
|
129
|
-
break;
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
## Contributing
|
|
135
|
-
|
|
136
|
-
All our code is open sourced and we encourage fellow developers to contribute and help improve it!
|
|
137
|
-
|
|
138
|
-
1. Fork it
|
|
139
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
140
|
-
3. Ensure SDK tests are passing
|
|
141
|
-
4. Commit your changes (`git commit -am 'Add some feature'`)
|
|
142
|
-
5. Push to the branch (`git push origin my-new-feature`)
|
|
143
|
-
6. Create new Pull Request
|
|
144
|
-
|
|
145
|
-
## License
|
|
146
|
-
|
|
147
|
-
This project is licensed under the GNU General Public License v2.0. Please see [LICENSE.md](LICENSE.md) located at the
|
|
148
|
-
project's root for more details.
|
|
1
|
+
<a href="https://github.com/globalpayments" target="_blank">
|
|
2
|
+
<img src="https://globalpayments.github.io/images/globapaymentsLogo.png" alt="Global Payments logo" title="Global Payments" align="right" width="225" />
|
|
3
|
+
</a>
|
|
4
|
+
|
|
5
|
+
# Global Payments Node.js SDK
|
|
6
|
+
|
|
7
|
+
This SDK makes it easy to integrate your Node.js application with our Card Not Present and Card Present APIs.
|
|
8
|
+
|
|
9
|
+
## Solutions
|
|
10
|
+
|
|
11
|
+
### General / Omnichannel
|
|
12
|
+
|
|
13
|
+
* API Payment Processing
|
|
14
|
+
* Apple Pay & Google Pay
|
|
15
|
+
* Secure Card Storage & Customer Management
|
|
16
|
+
* Subscriptions / Recurring Billing Solutions
|
|
17
|
+
* Credit, Debit, Gift & Loyalty, and eCheck/ACH
|
|
18
|
+
|
|
19
|
+
### Card Not Present (Ecommerce & MOTO) Specific
|
|
20
|
+
|
|
21
|
+
* Minimize PCI compliance requirements with Hosted Payment Solutions
|
|
22
|
+
* 140+ Authorization Currencies & 16 Settlement Currencies
|
|
23
|
+
* 150+ Local Payment Methods Worldwide
|
|
24
|
+
* Account Updater
|
|
25
|
+
* Inbuilt Fraud Prevention Rules
|
|
26
|
+
* 3D Secure, AVS and CVV Checks
|
|
27
|
+
* 260+ Global Enterprise Fraud Rules
|
|
28
|
+
|
|
29
|
+
### Card Present (Terminal & POS) Specific
|
|
30
|
+
|
|
31
|
+
* Secure End-To-End Encryption
|
|
32
|
+
|
|
33
|
+
## Requirements
|
|
34
|
+
|
|
35
|
+
* Node.js
|
|
36
|
+
|
|
37
|
+
## Installation
|
|
38
|
+
|
|
39
|
+
Installing the SDK into your solution is usually be done by either using NPM or Yarn.
|
|
40
|
+
|
|
41
|
+
To install via [NPM](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
npm install --save globalpayments-api
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
To install via [Yarn](https://yarnpkg.com/lang/en/docs/installing-dependencies/):
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
yarn add globalpayments-api
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Documentation and Examples
|
|
54
|
+
|
|
55
|
+
You can find the latest SDK documentation along with code examples and test cards on
|
|
56
|
+
the [Global Payments](https://developer.globalpay.com) Developer Hub.
|
|
57
|
+
|
|
58
|
+
In addition you can find working examples in the our example code repository.
|
|
59
|
+
|
|
60
|
+
_Quick Tip_: The included [test suite](https://github.com/globalpayments/node-sdk/tree/master/test) can be a great
|
|
61
|
+
source of code samples for using the SDK!
|
|
62
|
+
|
|
63
|
+
#### Process a Payment Example
|
|
64
|
+
|
|
65
|
+
```javascript
|
|
66
|
+
const card = new CreditCardData();
|
|
67
|
+
card.number = "4111111111111111";
|
|
68
|
+
card.expMonth = "12";
|
|
69
|
+
card.expYear = "2025";
|
|
70
|
+
card.cvn = "123";
|
|
71
|
+
|
|
72
|
+
card
|
|
73
|
+
.charge(129.99)
|
|
74
|
+
.withCurrency("EUR")
|
|
75
|
+
.execute()
|
|
76
|
+
.then((response) => {
|
|
77
|
+
const result = response.responseCode;
|
|
78
|
+
const message = response.responseMessage;
|
|
79
|
+
})
|
|
80
|
+
.catch((e) => {
|
|
81
|
+
// handle errors
|
|
82
|
+
});
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
#### Test Card Data
|
|
86
|
+
|
|
87
|
+
| Name | Number | Exp Month | Exp Year | CVN |
|
|
88
|
+
|-------------|------------------|-----------|----------|------|
|
|
89
|
+
| Visa | 4263970000005262 | 12 | 2025 | 123 |
|
|
90
|
+
| MasterCard | 2223000010005780 | 12 | 2019 | 900 |
|
|
91
|
+
| MasterCard | 5425230000004415 | 12 | 2025 | 123 |
|
|
92
|
+
| Discover | 6011000000000087 | 12 | 2025 | 123 |
|
|
93
|
+
| Amex | 374101000000608 | 12 | 2025 | 1234 |
|
|
94
|
+
| JCB | 3566000000000000 | 12 | 2025 | 123 |
|
|
95
|
+
| Diners Club | 36256000000725 | 12 | 2025 | 123 |
|
|
96
|
+
|
|
97
|
+
#### Testing Exceptions
|
|
98
|
+
|
|
99
|
+
During your integration you will want to test for specific issuer responses such as 'Card Declined'. Because our sandbox
|
|
100
|
+
environments do not actually reach out to issuing banks for authorizations, there are specific transaction amounts
|
|
101
|
+
and/or card numbers that will trigger gateway and issuing bank responses. Please contact your support representative for
|
|
102
|
+
a complete listing of values used to simulate transaction AVS/CVV results, declines, errors, and other responses that
|
|
103
|
+
can be caught in your code. Example error handling code:
|
|
104
|
+
|
|
105
|
+
```javascript
|
|
106
|
+
card
|
|
107
|
+
.charge(-5)
|
|
108
|
+
.withCurrency("USD")
|
|
109
|
+
.withAddress(address)
|
|
110
|
+
.execute()
|
|
111
|
+
.catch((e) => {
|
|
112
|
+
switch (e.name) {
|
|
113
|
+
case BuilderError.constructor.name:
|
|
114
|
+
// handle builder errors
|
|
115
|
+
break;
|
|
116
|
+
case ConfigurationError.constructor.name:
|
|
117
|
+
// handle errors related to your services configuration
|
|
118
|
+
break;
|
|
119
|
+
case GatewayError.constructor.name:
|
|
120
|
+
// handle gateway errors/exceptions
|
|
121
|
+
break;
|
|
122
|
+
case UnsupportedTransactionError.constructor.name:
|
|
123
|
+
// handle errors when the configured gateway doesn't support
|
|
124
|
+
// desired transaction
|
|
125
|
+
break;
|
|
126
|
+
case ApiError.constructor.name:
|
|
127
|
+
default:
|
|
128
|
+
// handle all other errors
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Contributing
|
|
135
|
+
|
|
136
|
+
All our code is open sourced and we encourage fellow developers to contribute and help improve it!
|
|
137
|
+
|
|
138
|
+
1. Fork it
|
|
139
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
140
|
+
3. Ensure SDK tests are passing
|
|
141
|
+
4. Commit your changes (`git commit -am 'Add some feature'`)
|
|
142
|
+
5. Push to the branch (`git push origin my-new-feature`)
|
|
143
|
+
6. Create new Pull Request
|
|
144
|
+
|
|
145
|
+
## License
|
|
146
|
+
|
|
147
|
+
This project is licensed under the GNU General Public License v2.0. Please see [LICENSE.md](LICENSE.md) located at the
|
|
148
|
+
project's root for more details.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
application_id = GP13428
|
|
2
|
+
dev_team_lead = russell.everett@e-hps.com
|
|
3
|
+
security_champion = philip.white@e-hps.com
|
|
4
|
+
observers = developers@globalpay.com
|
|
5
|
+
prod_branch = master
|
|
6
|
+
dev_branch = NextRelease
|
|
7
|
+
prod_urls = https://github.com/globalpayments/node-sdk
|
|
8
|
+
dev_urls = https://github.globalpay.com/Developer-Experience/node-sdk
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
-
import { GpApiRequest, IntervalToExpire } from "../../../../src/Entities";
|
|
1
|
+
import { GpApiRequest, IntervalToExpire, PorticoTokenConfig } from "../../../../src/Entities";
|
|
2
|
+
/**
|
|
3
|
+
* Builds the GP API access-token (sign-in) request.
|
|
4
|
+
*
|
|
5
|
+
* com.global.api.entities.gpApi.GpApiSessionInfo: a single signIn()
|
|
6
|
+
* method that takes an optional PorticoTokenConfig and branches on it,
|
|
7
|
+
* plus a buildCredentials() helper for the Portico-credentials flow.
|
|
8
|
+
*/
|
|
2
9
|
export declare class GpApiSessionInfo {
|
|
3
10
|
private static generateSecret;
|
|
4
11
|
private static generateNonce;
|
|
5
|
-
static signIn(appId: string, appKey: string, secondsToExpire: number | undefined, intervalToExpire: IntervalToExpire | null | undefined, permissions: string[]): Promise<GpApiRequest>;
|
|
12
|
+
static signIn(appId: string, appKey: string, secondsToExpire: number | undefined, intervalToExpire: IntervalToExpire | null | undefined, permissions: string[], porticoTokenConfig?: PorticoTokenConfig | null): Promise<GpApiRequest>;
|
|
13
|
+
static signOut(): GpApiRequest | null;
|
|
14
|
+
private static buildCredentials;
|
|
6
15
|
}
|
|
@@ -27,6 +27,13 @@ exports.GpApiSessionInfo = void 0;
|
|
|
27
27
|
const crypto = __importStar(require("crypto"));
|
|
28
28
|
const Entities_1 = require("../../../../src/Entities");
|
|
29
29
|
const AccessTokenRequest_1 = require("./AccessTokenRequest");
|
|
30
|
+
/**
|
|
31
|
+
* Builds the GP API access-token (sign-in) request.
|
|
32
|
+
*
|
|
33
|
+
* com.global.api.entities.gpApi.GpApiSessionInfo: a single signIn()
|
|
34
|
+
* method that takes an optional PorticoTokenConfig and branches on it,
|
|
35
|
+
* plus a buildCredentials() helper for the Portico-credentials flow.
|
|
36
|
+
*/
|
|
30
37
|
class GpApiSessionInfo {
|
|
31
38
|
static generateSecret(nonce, appKey) {
|
|
32
39
|
return crypto
|
|
@@ -36,14 +43,46 @@ class GpApiSessionInfo {
|
|
|
36
43
|
.toLowerCase();
|
|
37
44
|
}
|
|
38
45
|
static generateNonce() {
|
|
39
|
-
|
|
40
|
-
return base.toISOString();
|
|
46
|
+
return new Date().toISOString();
|
|
41
47
|
}
|
|
42
|
-
static async signIn(appId, appKey, secondsToExpire = 0, intervalToExpire = null, permissions) {
|
|
43
|
-
|
|
44
|
-
|
|
48
|
+
static async signIn(appId, appKey, secondsToExpire = 0, intervalToExpire = null, permissions, porticoTokenConfig = null) {
|
|
49
|
+
let requestBody;
|
|
50
|
+
if (porticoTokenConfig) {
|
|
51
|
+
const credentials = GpApiSessionInfo.buildCredentials(porticoTokenConfig);
|
|
52
|
+
const portico = {
|
|
53
|
+
credentials,
|
|
54
|
+
grant_type: "client_credentials",
|
|
55
|
+
};
|
|
56
|
+
if (appId) {
|
|
57
|
+
portico.app_id = appId;
|
|
58
|
+
}
|
|
59
|
+
requestBody = portico;
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
const nonce = GpApiSessionInfo.generateNonce();
|
|
63
|
+
requestBody = new AccessTokenRequest_1.AccessTokenRequest(appId, nonce, GpApiSessionInfo.generateSecret(nonce, appKey), "client_credentials", secondsToExpire, intervalToExpire, permissions);
|
|
64
|
+
}
|
|
45
65
|
return new Entities_1.GpApiRequest(Entities_1.GpApiRequest.ACCESS_TOKEN_ENDPOINT, "POST", JSON.stringify(requestBody));
|
|
46
66
|
}
|
|
67
|
+
static signOut() {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
static buildCredentials(config) {
|
|
71
|
+
const credentials = [];
|
|
72
|
+
const hasDevice = !!config.deviceId;
|
|
73
|
+
const hasSite = !!config.siteId;
|
|
74
|
+
const hasLicense = !!config.licenseId;
|
|
75
|
+
const hasUsername = !!config.username;
|
|
76
|
+
const hasPassword = !!config.password;
|
|
77
|
+
const hasApiKey = !!config.secretApiKey;
|
|
78
|
+
if (hasDevice && hasSite && hasLicense && hasUsername && hasPassword) {
|
|
79
|
+
credentials.push({ name: "device_id", value: String(config.deviceId) }, { name: "site_id", value: String(config.siteId) }, { name: "license_id", value: String(config.licenseId) }, { name: "username", value: config.username }, { name: "password", value: config.password });
|
|
80
|
+
}
|
|
81
|
+
else if (hasApiKey) {
|
|
82
|
+
credentials.push({ name: "apikey", value: config.secretApiKey });
|
|
83
|
+
}
|
|
84
|
+
return credentials;
|
|
85
|
+
}
|
|
47
86
|
}
|
|
48
87
|
exports.GpApiSessionInfo = GpApiSessionInfo;
|
|
49
88
|
//# sourceMappingURL=GpApiSessionInfo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GpApiSessionInfo.js","sourceRoot":"","sources":["../../../../../src/Builders/RequestBuilder/GpApi/GpApiSessionInfo.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiC;AACjC,
|
|
1
|
+
{"version":3,"file":"GpApiSessionInfo.js","sourceRoot":"","sources":["../../../../../src/Builders/RequestBuilder/GpApi/GpApiSessionInfo.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiC;AACjC,uDAIkC;AAClC,6DAA0D;AAE1D;;;;;;GAMG;AACH,MAAa,gBAAgB;IACnB,MAAM,CAAC,cAAc,CAAC,KAAa,EAAE,MAAc;QACzD,OAAO,MAAM;aACV,UAAU,CAAC,QAAQ,CAAC;aACpB,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC;aACtB,MAAM,CAAC,KAAK,CAAC;aACb,WAAW,EAAE,CAAC;IACnB,CAAC;IAEO,MAAM,CAAC,aAAa;QAC1B,OAAO,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CA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,GAAG,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QACtC,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC;QAExC,IAAI,SAAS,IAAI,OAAO,IAAI,UAAU,IAAI,WAAW,IAAI,WAAW,EAAE;YACpE,WAAW,CAAC,IAAI,CACd,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,EACrD,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,EACjD,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,EACvD,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,CAAC,QAAQ,EAAE,EAC5C,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,CAAC,QAAQ,EAAE,CAC7C,CAAC;SACH;aAAM,IAAI,SAAS,EAAE;YACpB,WAAW,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;SAClE;QAED,OAAO,WAAW,CAAC;IACrB,CAAC;CACF;AAnFD,4CAmFC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* PorticoTokenConfig holds configuration for Portico token authentication
|
|
3
|
+
* when requesting a GP API access token using Portico credentials.
|
|
4
|
+
*
|
|
5
|
+
* com.global.api.entities.gpApi.entities.PorticoTokenConfig.
|
|
6
|
+
*/
|
|
7
|
+
export declare class PorticoTokenConfig {
|
|
8
|
+
/** Site ID. */
|
|
9
|
+
siteId: string;
|
|
10
|
+
/** Account's license ID. */
|
|
11
|
+
licenseId: string;
|
|
12
|
+
/** Account's device ID. */
|
|
13
|
+
deviceId: string;
|
|
14
|
+
/** Account's username. */
|
|
15
|
+
username: string;
|
|
16
|
+
/** Account's password. */
|
|
17
|
+
password: string;
|
|
18
|
+
/**
|
|
19
|
+
* Secret API key used for authenticating requests.
|
|
20
|
+
*
|
|
21
|
+
* Handle with care; store securely and only expose to authorized
|
|
22
|
+
* components.
|
|
23
|
+
*/
|
|
24
|
+
secretApiKey: string;
|
|
25
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PorticoTokenConfig = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* PorticoTokenConfig holds configuration for Portico token authentication
|
|
6
|
+
* when requesting a GP API access token using Portico credentials.
|
|
7
|
+
*
|
|
8
|
+
* com.global.api.entities.gpApi.entities.PorticoTokenConfig.
|
|
9
|
+
*/
|
|
10
|
+
class PorticoTokenConfig {
|
|
11
|
+
/** Site ID. */
|
|
12
|
+
siteId;
|
|
13
|
+
/** Account's license ID. */
|
|
14
|
+
licenseId;
|
|
15
|
+
/** Account's device ID. */
|
|
16
|
+
deviceId;
|
|
17
|
+
/** Account's username. */
|
|
18
|
+
username;
|
|
19
|
+
/** Account's password. */
|
|
20
|
+
password;
|
|
21
|
+
/**
|
|
22
|
+
* Secret API key used for authenticating requests.
|
|
23
|
+
*
|
|
24
|
+
* Handle with care; store securely and only expose to authorized
|
|
25
|
+
* components.
|
|
26
|
+
*/
|
|
27
|
+
secretApiKey;
|
|
28
|
+
}
|
|
29
|
+
exports.PorticoTokenConfig = PorticoTokenConfig;
|
|
30
|
+
//# sourceMappingURL=PorticoTokenConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PorticoTokenConfig.js","sourceRoot":"","sources":["../../../../src/Entities/GpApi/PorticoTokenConfig.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,MAAa,kBAAkB;IAC7B,eAAe;IACR,MAAM,CAAS;IAEtB,4BAA4B;IACrB,SAAS,CAAS;IAEzB,2BAA2B;IACpB,QAAQ,CAAS;IAExB,0BAA0B;IACnB,QAAQ,CAAS;IAExB,0BAA0B;IACnB,QAAQ,CAAS;IAExB;;;;;OAKG;IACI,YAAY,CAAS;CAC7B;AAvBD,gDAuBC"}
|
|
@@ -19,4 +19,5 @@ __exportStar(require("./GpApiAccount"), exports);
|
|
|
19
19
|
__exportStar(require("./GpApiRequest"), exports);
|
|
20
20
|
__exportStar(require("./GpApiTokenResponse"), exports);
|
|
21
21
|
__exportStar(require("./PageResult"), exports);
|
|
22
|
+
__exportStar(require("./PorticoTokenConfig"), exports);
|
|
22
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/Entities/GpApi/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,iDAA+B;AAC/B,iDAA+B;AAC/B,uDAAqC;AACrC,+CAA6B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/Entities/GpApi/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,iDAA+B;AAC/B,iDAA+B;AAC/B,uDAAqC;AACrC,+CAA6B;AAC7B,uDAAqC"}
|
|
@@ -41,12 +41,14 @@ export declare class Transaction {
|
|
|
41
41
|
tokenUsageMode: PaymentMethodUsageMode;
|
|
42
42
|
cardDetails: Card;
|
|
43
43
|
threeDSecure: ThreeDSecure;
|
|
44
|
+
globalTransactionId: string;
|
|
44
45
|
/**
|
|
45
46
|
* Used for ACH transactions
|
|
46
47
|
*/
|
|
47
48
|
accountNumberLast4: string;
|
|
48
49
|
accountType: string;
|
|
49
50
|
cardIssuerResponse: CardIssuerResponse;
|
|
51
|
+
porticoTransactionId: string;
|
|
50
52
|
get transactionId(): string;
|
|
51
53
|
set transactionId(id: string);
|
|
52
54
|
get paymentMethodType(): PaymentMethodType;
|
|
@@ -43,12 +43,14 @@ class Transaction {
|
|
|
43
43
|
tokenUsageMode;
|
|
44
44
|
cardDetails;
|
|
45
45
|
threeDSecure;
|
|
46
|
+
globalTransactionId;
|
|
46
47
|
/**
|
|
47
48
|
* Used for ACH transactions
|
|
48
49
|
*/
|
|
49
50
|
accountNumberLast4;
|
|
50
51
|
accountType;
|
|
51
52
|
cardIssuerResponse;
|
|
53
|
+
porticoTransactionId;
|
|
52
54
|
get transactionId() {
|
|
53
55
|
return this.transactionReference?.transactionId;
|
|
54
56
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Transaction.js","sourceRoot":"","sources":["../../../src/Entities/Transaction.ts"],"names":[],"mappings":";;;AAAA,2BAea;AAGb,MAAa,WAAW;IACf,gBAAgB,CAAS;IAChC;;OAEG;IACI,kBAAkB,CAAS;IAC3B,aAAa,CAAS;IACtB,mBAAmB,CAAS;IAC5B,sBAAsB,CAAS;IAC/B,mBAAmB,CAAS;IAC5B,YAAY,CAAS;IACrB,eAAe,CAAS;IACxB,qBAAqB,CAAS;IAC9B,eAAe,CAAS;IACxB,iBAAiB,CAAS;IAC1B,kBAAkB,CAAS;IAC3B,eAAe,CAAS;IACxB,gBAAgB,CAAS;IACzB,YAAY,CAAU;IACtB,wBAAwB,CAAS;IACjC,oBAAoB,CAA2B;IAC/C,SAAS,CAAS;IAClB,QAAQ,CAAS;IACjB,kBAAkB,CAAS;IAC3B,eAAe,CAAS;IACxB,gBAAgB,CAAS;IACzB,oBAAoB,CAAuB;IAC3C,KAAK,CAAS;IACd,QAAQ,CAAW;IACnB,WAAW,CAAc;IACzB,mBAAmB,CAAS;IAC5B,SAAS,CAAS;IAClB,OAAO,CAAS;IAChB,WAAW,CAAS;IACpB,UAAU,CAAqB;IAC/B,YAAY,CAAe;IAC3B,WAAW,CAAS;IACpB,oBAAoB,CAAS;IAC7B,cAAc,CAAyB;IACvC,WAAW,CAAO;IAClB,YAAY,CAAe;
|
|
1
|
+
{"version":3,"file":"Transaction.js","sourceRo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B,WAAW,CAAS;IACpB,SAAS,CAAS;IAClB,MAAM,CAAS;IACf,SAAS,CAAS;IAClB,OAAO,CAAS;IAChB,eAAe,CAAO;IACtB,oBAAoB,CAAO;IAC3B,aAAa,CAAS;IACtB,iBAAiB,CAAS;IAC1B,eAAe,CAAS;IACxB,QAAQ,CAAS;IAEjB,WAAW,CAAS;IACpB,aAAa,CAAS;IACtB,UAAU,CAAS;IACnB,cAAc,CAAS;IACvB,qBAAqB,CAAS;IAC9B,YAAY,CAAS;IACrB,WAAW,CAAS;IACpB,gBAAgB,CAAS;IACzB,UAAU,CAAS;IACnB,cAAc,CAAS;IACvB,iBAAiB,CAAS;IAC1B,eAAe,CAAS;IACxB,aAAa,CAAS;IACtB,WAAW,CAAS;IACpB,gBAAgB,CAAS;IACzB,UAAU,CAAS;IACnB,kBAAkB,CAAS;IAC3B,WAAW,CAAS;IACpB,gBAAgB,CAAS;IACzB,gBAAgB,CAAS;IACzB,WAAW,CAAS;IACpB,iBAAiB,CAAS;IAC1B,gBAAgB,CAAS;IACzB,sBAAsB,CAAS;IAC/B,aAAa,CAAS;IACtB,aAAa,CAAS;IACtB,WAAW,CAAS;IACpB,oBAAoB,CAAS;IAC7B,OAAO,CAAS;
|
|
1
|
+
{"version":3,"file":"TransactionSummary.js","sourceRoot":"","sources":["../../../src/Entities/TransactionSummary.ts"],"names":[],"mappings":";;;AAAA,wBAA8E;AAE9E,MAAa,kBAAmB,SAAQ,cAAW;IAC1C,iBAAiB,CAAS;IAC1B,kBAAkB,CAAS;IAC3B,WAAW,CAAS;IACpB,0BAA0B,CAA6B;IACvD,sBAAsB,CAAS;IAC/B,QAAQ,CAAS;IACjB,gBAAgB,CAAS;IACzB,cAAc,CAAO;IACrB,mBAAmB,CAAS;IAC5B,cAAc,CAAS;IACvB,cAAc,CAAS;IACvB,UAAU,CAAS;IACnB,QAAQ,CAAS;IACjB,OAAO,CAAS;IAChB,OAAO,CAAS;IAChB,mBAAmB,CAAS;IAC5B,cAAc,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
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExtraChargeType = void 0;
|
|
4
|
+
var ExtraChargeType;
|
|
5
|
+
(function (ExtraChargeType) {
|
|
6
|
+
ExtraChargeType[ExtraChargeType["Restaurant"] = 1] = "Restaurant";
|
|
7
|
+
ExtraChargeType[ExtraChargeType["GiftShop"] = 2] = "GiftShop";
|
|
8
|
+
ExtraChargeType[ExtraChargeType["MiniBar"] = 3] = "MiniBar";
|
|
9
|
+
ExtraChargeType[ExtraChargeType["Telephone"] = 4] = "Telephone";
|
|
10
|
+
ExtraChargeType[ExtraChargeType["Laundry"] = 5] = "Laundry";
|
|
11
|
+
ExtraChargeType[ExtraChargeType["Other"] = 6] = "Other";
|
|
12
|
+
})(ExtraChargeType || (exports.ExtraChargeType = ExtraChargeType = {}));
|
|
13
|
+
//# sourceMappingURL=ExtraChargeType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExtraChargeType.js","sourceRoot":"","sources":["../../../../src/Entities/UPA/ExtraChargeType.ts"],"names":[],"mappings":";;;AAAA,IAAY,eAOX;AAPD,WAAY,eAAe;IACzB,iEAAc,CAAA;IACd,6DAAY,CAAA;IACZ,2DAAW,CAAA;IACX,+DAAa,CAAA;IACb,2DAAW,CAAA;IACX,uDAAS,CAAA;AACX,CAAC,EAPW,eAAe,+BAAf,eAAe,QAO1B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ExtraChargeType } from "./ExtraChargeType";
|
|
2
|
+
export declare class Lodging {
|
|
3
|
+
folioNumber?: string;
|
|
4
|
+
stayDuration?: number;
|
|
5
|
+
checkInDate?: Date;
|
|
6
|
+
checkOutDate?: Date;
|
|
7
|
+
dailyRate?: number;
|
|
8
|
+
preferredCustomer?: boolean;
|
|
9
|
+
extraChargeTypes: ExtraChargeType[];
|
|
10
|
+
extraChargeTotal?: number;
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Lodging = void 0;
|
|
4
|
+
class Lodging {
|
|
5
|
+
folioNumber;
|
|
6
|
+
stayDuration;
|
|
7
|
+
checkInDate;
|
|
8
|
+
checkOutDate;
|
|
9
|
+
dailyRate;
|
|
10
|
+
preferredCustomer;
|
|
11
|
+
extraChargeTypes = [];
|
|
12
|
+
extraChargeTotal;
|
|
13
|
+
}
|
|
14
|
+
exports.Lodging = Lodging;
|
|
15
|
+
//# sourceMappingURL=Lodging.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Lodging.js","sourceRoot":"","sources":["../../../../src/Entities/UPA/Lodging.ts"],"names":[],"mappings":";;;AAEA,MAAa,OAAO;IACX,WAAW,CAAU;IACrB,YAAY,CAAU;IACtB,WAAW,CAAQ;IACnB,YAAY,CAAQ;IACpB,SAAS,CAAU;IACnB,iBAAiB,CAAW;IAC5B,gBAAgB,GAAsB,EAAE,CAAC;IACzC,gBAAgB,CAAU;CAClC;AATD,0BASC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.POSData = void 0;
|
|
4
|
+
class POSData {
|
|
5
|
+
appName;
|
|
6
|
+
launchOrder = 0;
|
|
7
|
+
remove = false;
|
|
8
|
+
silent = 0;
|
|
9
|
+
}
|
|
10
|
+
exports.POSData = POSData;
|
|
11
|
+
//# sourceMappingURL=POSData.js.map
|