Skip to content

Commit

Permalink
Merge pull request #157 from CyberSource/nov24-release
Browse files Browse the repository at this point in the history
Nov24 release
  • Loading branch information
gaubansa authored Dec 10, 2024
2 parents 2e951f3 + 5ba5970 commit ac5cabb
Show file tree
Hide file tree
Showing 150 changed files with 6,833 additions and 1,331 deletions.
98 changes: 98 additions & 0 deletions MLE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
[![Generic badge](https://img.shields.io/badge/MLE-NEW-GREEN.svg)](https://shields.io/)

# Message Level Encryption (MLE) Feature

This feature provides an implementation of Message Level Encryption (MLE) for APIs provided by CyberSource, integrated within our SDK. This feature ensures secure communication by encrypting messages at the application level before they are sent over the network.

## Configuration

### Global MLE Configuration

In the `merchantConfig` object, set the `useMLEGlobally` variable to enable or disable MLE for all supported APIs for the Rest SDK.

- **Variable**: `useMLEGlobally`
- **Type**: `boolean`
- **Default**: `false`
- **Description**: Enables MLE globally for all APIs when set to `true`. If set to `true`, it will enable MLE for all API calls that support MLE by CyberSource, unless overridden by `mapToControlMLEonAPI`.

### API-level MLE Control

Optionally, you can control the MLE feature at the API level using the `mapToControlMLEonAPI` variable in the `merchantConfig` object.

- **Variable**: `mapToControlMLEonAPI`
- **Type**: `Map<string, boolean>`
- **Description**: Overrides the global MLE setting for specific APIs. The key is the function name of the API in the SDK, and the value is a boolean indicating whether MLE should be enabled (`true`) or disabled (`false`) for that specific API call.

### MLE Key Alias

Another optional parameter for MLE is `mleKeyAlias`, which specifies the key alias used to retrieve the MLE certificate from the JWT P12 file.

- **Variable**: `mleKeyAlias`
- **Type**: `string`
- **Default**: `CyberSource_SJC_US`
- **Description**: By default, CyberSource uses the `CyberSource_SJC_US` public certificate to encrypt the payload. However, users can override this default value by setting their own key alias.

## Notes
- If `useMLEGlobally` is set to true, it will enable MLE for all API calls that support MLE by CyberSource, unless overridden by mapToControlMLEonAPI.
- If `mapToControlMLEonAPI` is not provided or does not contain a specific API function name, the global useMLEGlobally setting will be applied.
- The `mleKeyAlias` parameter is optional and defaults to CyberSource_SJC_US if not specified by the user. Users can override this default value by setting their own key alias.

## Example Configuration

```json
{
"merchantConfig": {
"useMLEGlobally": true //globally MLE will be enabled for all MLE supported APIs
}
}
```
Or

```json
{
"merchantConfig": {
"useMLEGlobally": true, //globally MLE will be enabled for all MLE supported APIs
"mapToControlMLEonAPI": {
"apiFunctionName1": false, //if want to disable the particular api from list of MLE supported APIs
"apiFunctionName2": true //if want to enable MLE on API which is not in the list of supported MLE APIs for used version of Rest SDK
},
"mleKeyAlias": "Custom_Key_Alias" //optional if any custom value provided by Cybs
}
}
```
Or

```json
{
"merchantConfig": {
"useMLEGlobally": false, //globally MLE will be disabled for all APIs
"mapToControlMLEonAPI": {
"apiFunctionName1": true, //if want to enable MLE for API1
"apiFunctionName2": true //if want to enable MLE for API2
},
"mleKeyAlias": "Custom_Key_Alias" //optional if any custom value provided by Cybs
}
}
```

In the above examples:
- MLE is enabled/disabled globally (`useMLEGlobally` is true/false).
- `apiFunctionName1` will have MLE disabled/enabled based on value provided.
- `apiFunctionName2` will have MLE enabled.
- `mleKeyAlias` is set to `Custom_Key_Alias`, overriding the default value.

Please refer given link for sample codes with MLE:
https://github.com/CyberSource/cybersource-rest-samples-node/tree/master/Samples/MLEFeature

## Additional Information

### API Support
- MLE is initially designed to support a few APIs.
- It can be extended to support more APIs in the future based on requirements and updates.
### Authentication Type
- MLE is only supported with `JWT (JSON Web Token)` authentication type within the SDK.
### Using the SDK
To use the MLE feature in the SDK, configure the `merchantConfig` object as shown above and pass it to the SDK initialization.

## Contact
For any issues or further assistance, please open an issue on the GitHub repository or contact our support team.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ More information about this new logging framework can be found in this file : [L

## Features

### Message Level Encryption (MLE) Feature
[![Generic badge](https://img.shields.io/badge/MLE-NEW-GREEN.svg)](https://shields.io/)

This feature provides an implementation of Message Level Encryption (MLE) for APIs provided by CyberSource, integrated within our SDK. This feature ensures secure communication by encrypting messages at the application level before they are sent over the network.

More information about this new MLE feature can be found in this file : [MLE.md](MLE.md)

### MetaKey Support

A Meta Key is a single key that can be used by one, some, or all merchants (or accounts, if created by a Portfolio user) in the portfolio.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**parentProfileId** | **String** | Specify the Vault ID to which transacting MID needs to be assigned.Provide Vault ID as seen on EBC Vault management page. If not provided , transacting MID will be assigned to the existing default Vault at merchant's level. If there are no Vaults at merchant level , a new Vault will be created and transacting MID will be assigned to it. | [optional]
**vault** | [**CommerceSolutionsProductsTokenManagementConfigurationInformationConfigurationsVault**](CommerceSolutionsProductsTokenManagementConfigurationInformationConfigurationsVault.md) | | [optional]


Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# CyberSource.CommerceSolutionsProductsTokenManagementConfigurationInformationConfigurationsVault

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**defaultTokenType** | **String** | Default token type to be used. Possible Values: - 'CUSTOMER' - 'PAYMENT_INSTRUMENT' - 'INSTRUMENT_IDENTIFIER' | [optional]
**location** | **String** | Location where the vault will be stored. Use 'IDC' (the Indian Data Centre) when merchant is storing token data in India or 'GDC' (the Global Data Centre) for all other cases. Possible Values: - 'IDC' - 'GDC' | [optional]
**tokenFormats** | [**TmsTokenFormats**](TmsTokenFormats.md) | | [optional]
**tokenPermissions** | [**TokenPermissions**](TokenPermissions.md) | | [optional]
**sensitivePrivileges** | [**TmsSensitivePrivileges**](TmsSensitivePrivileges.md) | | [optional]
**nullify** | [**TmsNullify**](TmsNullify.md) | | [optional]
**networkTokenServices** | [**TmsNetworkTokenServices**](TmsNetworkTokenServices.md) | | [optional]


4 changes: 2 additions & 2 deletions docs/ECheckConfigCommonInternalOnlyProcessors.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Name | Type | Description | Notes
**terminalId** | **String** | *NEW* The 'Terminal Id' aka TID, is an identifier used for with your payments processor. Depending on the processor and payment acceptance type this may also be the default Terminal ID used for Card Present and Virtual Terminal transactions. Applicable for VPC processors. | [optional]
**enable15anTransactionReferenceNumber** | **Boolean** | *NEW* This ensures the transaction reference # contains an identifier that can be viewed in CYBS | [optional] [default to true]
**portalSupportedPaytypes** | **String** | *NEW* This is used by the EBC2 application | [optional] [default to 'CHECK']
**settlementMethod** | **Object** | *NEW* | [optional]
**verificationLevel** | **Object** | *NEW* | [optional]
**settlementMethod** | **String** | *NEW* Possible values: - BEST_GUESS | [optional] [default to 'BEST_GUESS']
**verificationLevel** | **String** | *NEW* Possible values: - VALIDATION | [optional] [default to 'VALIDATION']
**setCompletedState** | **Boolean** | *Moved* When set to Yes we will automatically update transactions to a completed status X-number of days after the transaction comes through; if no failure notification is received. When set to No means we will not update transaction status in this manner. For BAMS/Bank of America merchants, they should be set to No unless we are explicitly asked to set a merchant to YES. | [optional] [default to false]


2 changes: 1 addition & 1 deletion docs/ECheckConfigCommonProcessors.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Name | Type | Description | Notes
**companyId** | **String** | *EXISTING* company ID assigned to merchant by Acquiring bank. This field is alphanumeric | [optional]
**batchGroup** | **String** | *EXISTING* Capture requests are grouped into a batch bound for your payment processor. The batch time can be identified by reading the last 2-digits as military time. E.g., <processor>_16 = your processing cutoff is 4PM PST. Please note if you are in a different location you may then need to convert time zone as well. | [optional]
**enableAccuityForAvs** | **Boolean** | *NEW* Accuity is the original validation service that checks the account/routing number for formatting issues. Used by WF and set to \"Yes\" unless told otherwise | [optional] [default to true]
**accuityCheckType** | **Object** | *NEW* | [optional]
**accuityCheckType** | **String** | *NEW* Possible values: - ALWAYS | [optional] [default to 'ALWAYS']
**setCompletedState** | **Boolean** | *Moved* When set to Yes we will automatically update transactions to a completed status X-number of days after the transaction comes through; if no failure notification is received. When set to No means we will not update transaction status in this manner. For BAMS/Bank of America merchants, they should be set to No unless we are explicitly asked to set a merchant to YES. | [optional] [default to false]


Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**avsVersion** | **Object** | *NEW* | [optional]
**avsVersion** | **String** | *NEW* Possible values: - 2 | [optional] [default to '2']


Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Name | Type | Description | Notes
**avsAccountOwnershipService** | **Boolean** | *NEW* Determined in WF eTicket if account has opted into the Account Ownership Service. | [optional]
**avsAccountStatusService** | **Boolean** | *NEW* Determined in WF eTicket if account has opted into the Account Status Service. | [optional]
**avsSignedAgreement** | **Boolean** | *NEW* Taken from Addendum Agreement Column in boarding form. | [optional]
**avsCalculatedResponseBehavior** | **Object** | *NEW* | [optional]
**avsCalculatedResponseBehavior** | **String** | *NEW* Possible values: - continue | [optional] [default to 'continue']
**avsAdditionalId** | **String** | *NEW* Also known as the Additional ID. Taken from the boarding form. | [optional]
**enableAvs** | **Boolean** | *NEW* | [optional] [default to true]
**avsEntityId** | **String** | *NEW* Also known as the AVS Gateway Entity ID. | [optional]
**avsResultMode** | **Object** | *NEW* | [optional]
**avsResultMode** | **String** | *NEW* Possible values: - FULL_RESPONSE - LOGIC_BOX | [optional]
**enableAvsTokenCreation** | **Boolean** | *NEW* Applicable if the merchant wants to run AVS on token creation requests only. | [optional] [default to false]


4 changes: 2 additions & 2 deletions docs/GenerateCaptureContextRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**targetOrigins** | **[String]** | The [target origin](https://developer.mozilla.org/en-US/docs/Glossary/Origin) of the website on which you will be launching Microform is defined by the scheme (protocol), hostname (domain) and port number (if used). You must use https://hostname (unless you use http://localhost) Wildcards are NOT supported. Ensure that subdomains are included. Any valid top-level domain is supported (e.g. .com, .co.uk, .gov.br etc) Examples: - https://example.com - https://subdomain.example.com - https://example.com:8080<br><br> If you are embedding within multiple nested iframes you need to specify the origins of all the browser contexts used, for example: targetOrigins: [ \"https://example.com\", \"https://basket.example.com\", \"https://ecom.example.com\" ] | [optional]
**allowedCardNetworks** | **[String]** | The list of card networks you want to use for this Microform transaction. Microform currently supports the following card networks: - VISA - MAESTRO - MASTERCARD - AMEX - DISCOVER - DINERSCLUB - JCB - CUP - CARTESBANCAIRES - CARNET | [optional]
**clientVersion** | **String** | Specify the version of Microform that you want to use. | [optional]
**targetOrigins** | **[String]** | The [target origin](https://developer.mozilla.org/en-US/docs/Glossary/Origin) of the website on which you will be launching Microform is defined by the scheme (protocol), hostname (domain) and port number (if used). You must use https://hostname (unless you use http://localhost) Wildcards are NOT supported. Ensure that subdomains are included. Any valid top-level domain is supported (e.g. .com, .co.uk, .gov.br etc) Examples: - https://example.com - https://subdomain.example.com - https://example.com:8080<br><br> If you are embedding within multiple nested iframes you need to specify the origins of all the browser contexts used, for example: targetOrigins: [ \"https://example.com\", \"https://basket.example.com\", \"https://ecom.example.com\" ] | [optional]
**allowedCardNetworks** | **[String]** | The list of card networks you want to use for this Microform transaction. Microform currently supports the following card networks: - VISA - MASTERCARD - AMEX - CARNET - CARTESBANCAIRES - CUP - DINERSCLUB - DISCOVER - EFTPOS - ELO - JCB - JCREW - MADA - MAESTRO - MEEZA | [optional]
**checkoutApiInitialization** | [**Microformv2sessionsCheckoutApiInitialization**](Microformv2sessionsCheckoutApiInitialization.md) | | [optional]


4 changes: 2 additions & 2 deletions docs/GenerateUnifiedCheckoutCaptureContextRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**targetOrigins** | **[String]** | The [target origin](https://developer.mozilla.org/en-US/docs/Glossary/Origin) of the website on which you will be launching Unified Checkout is defined by the scheme (protocol), hostname (domain) and port number (if used). You must use https://hostname (unless you use http://localhost) Wildcards are NOT supported. Ensure that subdomains are included. Any valid top-level domain is supported (e.g. .com, .co.uk, .gov.br etc) Examples: - https://example.com - https://subdomain.example.com - https://example.com:8080<br><br> If you are embedding within multiple nested iframes you need to specify the origins of all the browser contexts used, for example: targetOrigins: [ \"https://example.com\", \"https://basket.example.com\", \"https://ecom.example.com\" ] | [optional]
**clientVersion** | **String** | Specify the version of Unified Checkout that you want to use. | [optional]
**allowedCardNetworks** | **[String]** | The list of card networks you want to use for this Unified Checkout transaction. Unified Checkout currently supports the following card networks: - VISA - MASTERCARD - AMEX - DISCOVER - DINERSCLUB - JCB | [optional]
**targetOrigins** | **[String]** | The [target origin](https://developer.mozilla.org/en-US/docs/Glossary/Origin) of the website on which you will be launching Unified Checkout is defined by the scheme (protocol), hostname (domain) and port number (if used). You must use https://hostname (unless you use http://localhost) Wildcards are NOT supported. Ensure that subdomains are included. Any valid top-level domain is supported (e.g. .com, .co.uk, .gov.br etc) Examples: - https://example.com - https://subdomain.example.com - https://example.com:8080<br><br> If you are embedding within multiple nested iframes you need to specify the origins of all the browser contexts used, for example: targetOrigins: [ \"https://example.com\", \"https://basket.example.com\", \"https://ecom.example.com\" ] | [optional]
**allowedCardNetworks** | **[String]** | The list of card networks you want to use for this Unified Checkout transaction. Unified Checkout currently supports the following card networks: - VISA - MASTERCARD - AMEX - CARNET - CARTESBANCAIRES - CUP - DINERSCLUB - DISCOVER - EFTPOS - ELO - JCB - JCREW - MADA - MAESTRO - MEEZA | [optional]
**allowedPaymentTypes** | **[String]** | The payment types that are allowed for the merchant. Possible values when launching Unified Checkout: - PANENTRY - GOOGLEPAY - SRC - CHECK <br><br> Possible values when launching Unified Checkout with Checkout API: - PANENTRY - SRC <br><br> Possible values when launching Click To Pay Drop-In UI: - CLICKTOPAY <br><br> **Important:** - SRC and CLICKTOPAY are only available for Visa, Mastercard and AMEX. | [optional]
**country** | **String** | Country the purchase is originating from (e.g. country of the merchant). Use the two-character ISO Standard | [optional]
**locale** | **String** | Localization of the User experience conforming to the ISO 639-1 language standards and two-character ISO Standard Country Code. Please refer to list of [supported locales through Unified Checkout](https://developer.cybersource.com/docs/cybs/en-us/unified-checkout/developer/all/rest/unified-checkout/uc-appendix-languages.html) | [optional]
Expand Down
1 change: 1 addition & 0 deletions docs/Ptsv2paymentsPaymentInformationCard.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Name | Type | Description | Notes
**startMonth** | **String** | Month of the start of the Maestro (UK Domestic) card validity period. Do not include the field, even with a blank value, if the card is not a Maestro (UK Domestic) card. `Format: MM`. Possible values: 01 through 12. **Note** The start date is not required for Maestro (UK Domestic) transactions. | [optional]
**startYear** | **String** | Year of the start of the Maestro (UK Domestic) card validity period. Do not include the field, even with a blank value, if the card is not a Maestro (UK Domestic) card. `Format: YYYY`. **Note** The start date is not required for Maestro (UK Domestic) transactions. | [optional]
**productName** | **String** | Name of the card product. Possible value: - BNDES This field is supported only for BNDES transactions on CyberSource through VisaNet. The value for this field corresponds to the following data in the TC 33 capture file5: - Record: CP07 TCR4 - Position: 115-120 - Field: Brazil Country Data | [optional]
**productSubtype** | **String** | This field would contain the indicator for transaction type Possible values: - AC: Agriculture Maintenance Account - AE: Agriculture Debit Account/Electron - AG: Agriculture - AI: Agriculture Investment Loan - CG: Brazil Cargo - CS: Construction - DS: Distribution - HC: Healthcare - LP: Visa Large Purchase Advantage - MA: Visa Mobile Agent - MB: Interoperable Mobile Branchless Banking - MG: Visa Mobile General - VA: Visa Vale - Supermarket - VF: Visa Vale - Fuel - VR: Visa Vale - Restaurant | [optional]
**typeSelectionIndicator** | **String** | Flag that identifies how the card type was selected. Possible values: - 0: Card type was selected based on default acquirer settings. - 1: Customer selected the card type. | [optional]


Loading

0 comments on commit ac5cabb

Please sign in to comment.