Skip to content

Commit 1fbe5a7

Browse files
authored
Merge pull request #67 from snavinch/master
June 2021 SDK Release
2 parents af8329d + fed658a commit 1fbe5a7

File tree

84 files changed

+1019
-351
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+1019
-351
lines changed

README.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,33 @@
22

33
The CyberSource Node client provides convenient access to the [CyberSource REST API](https://developer.cybersource.com/api/reference/api-reference.html) from your Node application.
44

5-
## Requirements
5+
## Requirements
6+
67
* Node.js version 6.17.1 or higher
78
* A CyberSource account (see _Registration & Configuration_ section below)
89

9-
1010
## Installation
1111

1212
```shell
13-
npm install cybersource-rest-client
13+
npm install cybersource-rest-client
1414
```
1515

1616
## Registration & Configuration
17+
1718
Use of this SDK and the CyberSource APIs requires having an account on our system. You can find details of getting a test account and creating your keys [here](https://developer.cybersource.com/api/developer-guides/dita-gettingstarted/registration.html)
1819

1920
Remember this SDK is for use in server-side Node applications that access the CyberSource REST API and credentials should always be securely stored and accessed appropriately.
2021

2122
## SDK Usage Examples and Sample Code
23+
2224
To get started using this SDK, it's highly recommended to download our sample code repository:
25+
2326
* [Cybersource Node.js Sample Code Repository (on GitHub)](https://github.com/CyberSource/cybersource-rest-samples-node)
2427

2528
In that respository, we have comprehensive sample code for all common uses of our API:
2629

2730
Additionally, you can find details and examples of how our API is structured in our API Reference Guide:
31+
2832
* [Developer Center API Reference](https://developer.cybersource.com/api/reference/api-reference.html)
2933

3034
The API Reference Guide provides examples of what information is needed for a particular request and how that information would be formatted. Using those examples, you can easily determine what methods would be necessary to include that information in a request using this SDK.
@@ -40,18 +44,18 @@ MIDs continue to be able to create keys for themselves, even if a Meta Key is ge
4044
Further information on MetaKey can be found in [New Business Center User Guide](https://developer.cybersource.com/library/documentation/dev_guides/Business_Center/New_Business_Center_User_Guide.pdf).
4145

4246
### Switching between the sandbox environment and the production environment
43-
Cybersource maintains a complete sandbox environment for testing and development purposes. This sandbox environment is an exact duplicate of our production environment with the transaction authorization and settlement process simulated. By default, this SDK is configured to communicate with the sandbox environment. To switch to the production environment, set the `runEnvironment` in the SDK Configuration. See our sample at https://github.com/CyberSource/cybersource-rest-samples-node/blob/master/Data/Configuration.js.
47+
48+
Cybersource maintains a complete sandbox environment for testing and development purposes. This sandbox environment is an exact duplicate of our production environment with the transaction authorization and settlement process simulated. By default, this SDK is configured to communicate with the sandbox environment. To switch to the production environment, set the `runEnvironment` in the SDK Configuration. See our sample at <https://github.com/CyberSource/cybersource-rest-samples-node/blob/master/Data/Configuration.js>.
4449

4550
```javascript
46-
// For TESTING use
47-
const RunEnvironment = "cybersource.environment.sandbox";
48-
// For PRODUCTION use
49-
const RunEnvironment = "cybersource.environment.production";
51+
// For TESTING use
52+
const RunEnvironment = "apitest.cybersource.com";
53+
// For PRODUCTION use
54+
const RunEnvironment = "api.cybersource.com";
5055
```
5156

5257
API credentials are different for each environment, so be sure to switch to the appropriate credentials when switching environments.
5358

54-
55-
5659
## License
60+
5761
This repository is distributed under a proprietary license. See the provided [`LICENSE.txt`](/LICENSE.txt) file.

docs/PtsV2PaymentsPost201ResponseOrderInformation.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**amountDetails** | [**PtsV2PaymentsPost201ResponseOrderInformationAmountDetails**](PtsV2PaymentsPost201ResponseOrderInformationAmountDetails.md) | | [optional]
77
**invoiceDetails** | [**PtsV2PaymentsPost201ResponseOrderInformationInvoiceDetails**](PtsV2PaymentsPost201ResponseOrderInformationInvoiceDetails.md) | | [optional]
8+
**rewardPointsDetails** | [**PtsV2PaymentsPost201ResponseOrderInformationRewardPointsDetails**](PtsV2PaymentsPost201ResponseOrderInformationRewardPointsDetails.md) | | [optional]
89

910

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# CyberSource.PtsV2PaymentsPost201ResponseOrderInformationRewardPointsDetails
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**pointsBeforeRedemption** | **String** | Loyalty points total balance before redemption. For Example: Points, such as 100 | [optional]
7+
**pointsValueBeforeRedemption** | **String** | The total value of loyalty points before redemption in the default currency. Max characters is 12 excluding the \&quot;.\&quot; symbol For Example: Points, such as 20.00 | [optional]
8+
**pointsRedeemed** | **String** | Number of loyalty points that were redeemed. For Example: Points, such as 100 | [optional]
9+
**pointsValueRedeemed** | **String** | The value of the loyalty points that were redeemed in the default currency. Max characters is 12 excluding the \&quot;.\&quot; symbol For Example: Points, such as 100.00 | [optional]
10+
**pointsAfterRedemption** | **String** | Loyalty Points remaining total balance after redemption. For Example: Points, such as 20.00 | [optional]
11+
**pointsValueAfterRedemption** | **String** | The value of the remaining loyalty points after redumption in the default currency. Max characters is 12 excluding the \&quot;.\&quot; symbol For Example: Points, such as 20.00 | [optional]
12+
13+

docs/PtsV2PaymentsPost201ResponsePaymentInformationCard.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**suffix** | **String** | Last four digits of the cardholder’s account number. This field is included in the reply message when the client software that is installed on the POS terminal uses the token management service (TMS) to retrieve tokenized payment details. You must contact customer support to have your account enabled to receive these fields in the credit reply message. #### PIN debit This field is returned only for tokenized transactions. You can use this value on the receipt that you give to the cardholder. Returned by PIN debit credit and PIN debit purchase. This field is supported only by the following processors: - American Express Direct - Credit Mutuel-CIC - FDC Nashville Global - OmniPay Direct - SIX | [optional]
6+
**suffix** | **String** | Last four digits of the cardholder’s account number. This field is included in the reply message when the client software that is installed on the POS terminal uses the token management service (TMS) to retrieve tokenized payment details. You must contact customer support to have your account enabled to receive these fields in the credit reply message. #### Google Pay transactions For PAN-based Google Pay transactions, this field is returned in the API response. #### PIN debit This field is returned only for tokenized transactions. You can use this value on the receipt that you give to the cardholder. Returned by PIN debit credit and PIN debit purchase. This field is supported only by the following processors: - American Express Direct - Credit Mutuel-CIC - FDC Nashville Global - OmniPay Direct - SIX | [optional]
7+
**expirationMonth** | **String** | Two-digit month in which the payment card expires. Format: &#x60;MM&#x60;. Valid values: &#x60;01&#x60; through &#x60;12&#x60;. Leading 0 is required. #### Barclays and Streamline For Maestro (UK Domestic) and Maestro (International) cards on Barclays and Streamline, this must be a valid value (&#x60;01&#x60; through &#x60;12&#x60;) but is not required to be a valid expiration date. In other words, an expiration date that is in the past does not cause CyberSource to reject your request. However, an invalid expiration date might cause the issuer to reject your request. #### Encoded Account Numbers For encoded account numbers (_type_&#x3D;039), if there is no expiration date on the card, use &#x60;12&#x60;. #### FDMS Nashville Required field. #### All other processors Required if &#x60;pointOfSaleInformation.entryMode&#x3D;keyed&#x60;. However, this field is optional if your account is configured for relaxed requirements for address data and expiration date. **Important** It is your responsibility to determine whether a field is required for the transaction you are requesting. #### Google Pay transactions For PAN-based Google Pay transactions, this field is returned in the API response. | [optional]
8+
**expirationYear** | **String** | Four-digit year in which the payment card expires. Format: &#x60;YYYY&#x60;. #### Barclays and Streamline For Maestro (UK Domestic) and Maestro (International) cards on Barclays and Streamline, this must be a valid value (&#x60;1900&#x60; through &#x60;3000&#x60;) but is not required to be a valid expiration date. In other words, an expiration date that is in the past does not cause CyberSource to reject your request. However, an invalid expiration date might cause the issuer to reject your request. #### Encoded Account Numbers For encoded account numbers (**_type_**&#x60;&#x3D;039&#x60;), if there is no expiration date on the card, use &#x60;2021&#x60;. #### FDMS Nashville Required field. #### FDC Nashville Global and FDMS South You can send in 2 digits or 4 digits. If you send in 2 digits, they must be the last 2 digits of the year. #### All other processors Required if &#x60;pointOfSaleInformation.entryMode&#x3D;keyed&#x60;. However, this field is optional if your account is configured for relaxed requirements for address data and expiration date. **Important** It is your responsibility to determine whether a field is required for the transaction you are requesting. #### Google Pay transactions For PAN-based Google Pay transactions, this field is returned in the API response. | [optional]
9+
**type** | **String** | Three-digit value that indicates the card type. **IMPORTANT** It is strongly recommended that you include the card type field in request messages even if it is optional for your processor and card type. Omitting the card type can cause the transaction to be processed with the wrong card type. Possible values: - &#x60;001&#x60;: Visa. For card-present transactions on all processors except SIX, the Visa Electron card type is processed the same way that the Visa debit card is processed. Use card type value &#x60;001&#x60; for Visa Electron. - &#x60;002&#x60;: Mastercard, Eurocard[^1], which is a European regional brand of Mastercard. - &#x60;003&#x60;: American Express - &#x60;004&#x60;: Discover - &#x60;005&#x60;: Diners Club - &#x60;006&#x60;: Carte Blanche[^1] - &#x60;007&#x60;: JCB[^1] - &#x60;014&#x60;: Enroute[^1] - &#x60;021&#x60;: JAL[^1] - &#x60;024&#x60;: Maestro (UK Domestic)[^1] - &#x60;031&#x60;: Delta[^1]: Use this value only for Ingenico ePayments. For other processors, use &#x60;001&#x60; for all Visa card types. - &#x60;033&#x60;: Visa Electron[^1]. Use this value only for Ingenico ePayments and SIX. For other processors, use &#x60;001&#x60; for all Visa card types. - &#x60;034&#x60;: Dankort[^1] - &#x60;036&#x60;: Cartes Bancaires[^1,4] - &#x60;037&#x60;: Carta Si[^1] - &#x60;039&#x60;: Encoded account number[^1] - &#x60;040&#x60;: UATP[^1] - &#x60;042&#x60;: Maestro (International)[^1] - &#x60;050&#x60;: Hipercard[^2,3] - &#x60;051&#x60;: Aura - &#x60;054&#x60;: Elo[^3] - &#x60;062&#x60;: China UnionPay [^1]: For this card type, you must include the &#x60;paymentInformation.card.type&#x60; or &#x60;paymentInformation.tokenizedCard.type&#x60; field in your request for an authorization or a stand-alone credit. [^2]: For this card type on Cielo 3.0, you must include the &#x60;paymentInformation.card.type&#x60; or &#x60;paymentInformation.tokenizedCard.type&#x60; field in a request for an authorization or a stand-alone credit. This card type is not supported on Cielo 1.5. [^3]: For this card type on Getnet and Rede, you must include the &#x60;paymentInformation.card.type&#x60; or &#x60;paymentInformation.tokenizedCard.type&#x60; field in a request for an authorization or a stand-alone credit. [^4]: For this card type, you must include the &#x60;paymentInformation.card.type&#x60; in your request for any payer authentication services. #### Used by **Authorization** Required for Carte Blanche and JCB. Optional for all other card types. #### Card Present reply This field is included in the reply message when the client software that is installed on the POS terminal uses the token management service (TMS) to retrieve tokenized payment details. You must contact customer support to have your account enabled to receive these fields in the credit reply message. Returned by the Credit service. This reply field is only supported by the following processors: - American Express Direct - Credit Mutuel-CIC - FDC Nashville Global - OmniPay Direct - SIX #### Google Pay transactions For PAN-based Google Pay transactions, this field is returned in the API response. #### GPX This field only supports transactions from the following card types: - Visa - Mastercard - AMEX - Discover - Diners - JCB - Union Pay International | [optional]
10+
**prefix** | **String** | Bank Identification Number (BIN). This is the initial four to six numbers on a credit card account number. #### Google Pay transactions For PAN-based Google Pay transactions, this field is returned in the API response. | [optional]
711

812

0 commit comments

Comments
 (0)