Skip to content

Commit 09cfdd7

Browse files
authored
Merge pull request #180 from CyberSource/release-march25
Release march25
2 parents e649352 + 30137d3 commit 09cfdd7

File tree

244 files changed

+119588
-116025
lines changed

Some content is hidden

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

244 files changed

+119588
-116025
lines changed

MLE.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
[![Generic badge](https://img.shields.io/badge/MLE-NEW-GREEN.svg)](https://shields.io/)
2+
3+
# Message Level Encryption (MLE) Feature
4+
5+
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.
6+
7+
## Configuration
8+
9+
### Global MLE Configuration
10+
11+
In the `merchantConfig` object, set the `useMLEGlobally` variable to enable or disable MLE for all supported APIs for the Rest SDK.
12+
13+
- **Variable**: `useMLEGlobally`
14+
- **Type**: `boolean`
15+
- **Default**: `false`
16+
- **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`.
17+
18+
### API-level MLE Control
19+
20+
Optionally, you can control the MLE feature at the API level using the `mapToControlMLEonAPI` variable in the `merchantConfig` object.
21+
22+
- **Variable**: `mapToControlMLEonAPI`
23+
- **Type**: `map = [string, boolean]`
24+
- **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.
25+
26+
### MLE Key Alias
27+
28+
Another optional parameter for MLE is `mleKeyAlias`, which specifies the key alias used to retrieve the MLE certificate from the JWT P12 file.
29+
30+
- **Variable**: `mleKeyAlias`
31+
- **Type**: `string`
32+
- **Default**: `CyberSource_SJC_US`
33+
- **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.
34+
35+
## Notes
36+
- If `useMLEGlobally` is set to true, it will enable MLE for all API calls that support MLE by CyberSource, unless overridden by mapToControlMLEonAPI.
37+
- If `mapToControlMLEonAPI` is not provided or does not contain a specific API function name, the global useMLEGlobally setting will be applied.
38+
- 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.
39+
40+
## Example Configuration
41+
42+
```php
43+
// Enable MLE globally for all supported APIs
44+
$merchantConfig->setUseMLEGlobally(true);
45+
```
46+
47+
Or
48+
49+
```php
50+
// Enable MLE globally for all supported APIs
51+
$merchantConfig->setUseMLEGlobally(true);
52+
53+
// Optionally, control MLE at the API level
54+
$merchantConfig->setMapToControlMLEonAPI([
55+
'apiFunctionName1' => false, // Disable MLE for this specific API
56+
'apiFunctionName2' => true // Enable MLE for this specific API
57+
]);
58+
59+
// Optionally, set a custom MLE key alias
60+
$merchantConfig->setMleKeyAlias('Custom_Key_Alias');
61+
```
62+
63+
Or
64+
65+
```php
66+
// Disable MLE globally for all supported APIs
67+
$merchantConfig->setUseMLEGlobally(false);
68+
69+
// Optionally, enable MLE for some APIs
70+
$merchantConfig->setMapToControlMLEonAPI([
71+
'apiFunctionName1' => true, // Enable MLE for this specific API
72+
'apiFunctionName2' => true // Enable MLE for this specific API
73+
]);
74+
75+
// Optionally, set a custom MLE key alias
76+
$merchantConfig->setMleKeyAlias('Custom_Key_Alias');
77+
```
78+
79+
In the above examples:
80+
- MLE is enabled/disabled globally (`useMLEGlobally` is true/false).
81+
- `apiFunctionName1` will have MLE disabled/enabled based on value provided.
82+
- `apiFunctionName2` will have MLE enabled.
83+
- `mleKeyAlias` is set to `Custom_Key_Alias`, overriding the default value.
84+
85+
Please refer given link for sample codes with MLE:
86+
https://github.com/CyberSource/cybersource-rest-samples-php/tree/master/Samples/MLEFeature
87+
88+
## Additional Information
89+
90+
### API Support
91+
- MLE is initially designed to support a few APIs.
92+
- It can be extended to support more APIs in the future based on requirements and updates.
93+
### Authentication Type
94+
- MLE is only supported with `JWT (JSON Web Token)` authentication type within the SDK.
95+
### Using the SDK
96+
To use the MLE feature in the SDK, configure the `merchantConfig` object as shown above and pass it to the SDK initialization.
97+
98+
## Contact
99+
For any issues or further assistance, please open an issue on the GitHub repository or contact our support team.

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ override the new secure-http default setting)*.
2929
{
3030
"require": {
3131
"php": ">=8.0.0",
32-
"cybersource/rest-client-php": "0.0.59"
32+
"cybersource/rest-client-php": "0.0.60"
3333
}
3434
}
3535
```
@@ -100,6 +100,13 @@ More information about this new logging framework can be found in this file : [L
100100

101101
## Features
102102

103+
### Message Level Encryption (MLE) Feature
104+
[![Generic badge](https://img.shields.io/badge/MLE-NEW-GREEN.svg)](https://shields.io/)
105+
106+
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.
107+
108+
More information about this new MLE feature can be found in this file : [MLE.md](MLE.md)
109+
103110
### MetaKey Support
104111

105112
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.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cybersource/rest-client-php",
3-
"version": "0.0.59",
3+
"version": "0.0.60",
44
"description": "Client SDK for CyberSource REST APIs",
55
"keywords": [
66
"cybersource", "payments", "ecommerce", "merchant", "merchants", "authorize", "visa", "payment", "payment-gateway", "payment-integration", "payment-module", "payment-processing", "payment-service", "payment-methods"

docs/Api/BatchesApi.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Method | HTTP request | Description
1111

1212

1313
# **getBatchReport**
14-
> \CyberSource\Model\InlineResponse2007 getBatchReport($batchId)
14+
> \CyberSource\Model\InlineResponse2004 getBatchReport($batchId)
1515
1616
Retrieve a Batch Report
1717

@@ -42,7 +42,7 @@ Name | Type | Description | Notes
4242

4343
### Return type
4444

45-
[**\CyberSource\Model\InlineResponse2007**](../Model/InlineResponse2007.md)
45+
[**\CyberSource\Model\InlineResponse2004**](../Model/InlineResponse2004.md)
4646

4747
### Authorization
4848

@@ -56,7 +56,7 @@ No authorization required
5656
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
5757

5858
# **getBatchStatus**
59-
> \CyberSource\Model\InlineResponse2006 getBatchStatus($batchId)
59+
> \CyberSource\Model\InlineResponse2003 getBatchStatus($batchId)
6060
6161
Retrieve a Batch Status
6262

@@ -87,7 +87,7 @@ Name | Type | Description | Notes
8787

8888
### Return type
8989

90-
[**\CyberSource\Model\InlineResponse2006**](../Model/InlineResponse2006.md)
90+
[**\CyberSource\Model\InlineResponse2003**](../Model/InlineResponse2003.md)
9191

9292
### Authorization
9393

@@ -101,7 +101,7 @@ No authorization required
101101
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
102102

103103
# **getBatchesList**
104-
> \CyberSource\Model\InlineResponse2005 getBatchesList($offset, $limit, $fromDate, $toDate)
104+
> \CyberSource\Model\InlineResponse2002 getBatchesList($offset, $limit, $fromDate, $toDate)
105105
106106
List Batches
107107

@@ -138,7 +138,7 @@ Name | Type | Description | Notes
138138

139139
### Return type
140140

141-
[**\CyberSource\Model\InlineResponse2005**](../Model/InlineResponse2005.md)
141+
[**\CyberSource\Model\InlineResponse2002**](../Model/InlineResponse2002.md)
142142

143143
### Authorization
144144

docs/Api/CreateNewWebhooksApi.md

Lines changed: 2 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -4,107 +4,15 @@ All URIs are relative to *https://apitest.cybersource.com*
44

55
Method | HTTP request | Description
66
------------- | ------------- | -------------
7-
[**createWebhookSubscription**](CreateNewWebhooksApi.md#createWebhookSubscription) | **POST** /notification-subscriptions/v1/webhooks | Create a Webhook
8-
[**findProductsToSubscribe**](CreateNewWebhooksApi.md#findProductsToSubscribe) | **GET** /notification-subscriptions/v1/products/{organizationId} | Find Products You Can Subscribe To
97
[**saveSymEgressKey**](CreateNewWebhooksApi.md#saveSymEgressKey) | **POST** /kms/egress/v2/keys-sym | Create Webhook Security Keys
108

119

12-
# **createWebhookSubscription**
13-
> \CyberSource\Model\InlineResponse2014 createWebhookSubscription($createWebhookRequest)
14-
15-
Create a Webhook
16-
17-
Create a new webhook subscription. Before creating a webhook, ensure that a security key has been created at the top of this developer center section. You will not need to pass us back the key during the creation of the webhook, but you will receive an error if you did not already create a key or store one on file.
18-
19-
### Example
20-
```php
21-
<?php
22-
require_once(__DIR__ . '/vendor/autoload.php');
23-
24-
$api_instance = new CyberSource\Api\CreateNewWebhooksApi();
25-
$createWebhookRequest = new \CyberSource\Model\CreateWebhookRequest(); // \CyberSource\Model\CreateWebhookRequest | The webhook payload
26-
27-
try {
28-
$result = $api_instance->createWebhookSubscription($createWebhookRequest);
29-
print_r($result);
30-
} catch (Exception $e) {
31-
echo 'Exception when calling CreateNewWebhooksApi->createWebhookSubscription: ', $e->getMessage(), PHP_EOL;
32-
}
33-
?>
34-
```
35-
36-
### Parameters
37-
38-
Name | Type | Description | Notes
39-
------------- | ------------- | ------------- | -------------
40-
**createWebhookRequest** | [**\CyberSource\Model\CreateWebhookRequest**](../Model/CreateWebhookRequest.md)| The webhook payload | [optional]
41-
42-
### Return type
43-
44-
[**\CyberSource\Model\InlineResponse2014**](../Model/InlineResponse2014.md)
45-
46-
### Authorization
47-
48-
No authorization required
49-
50-
### HTTP request headers
51-
52-
- **Content-Type**: application/json;charset=utf-8
53-
- **Accept**: application/json;charset=utf-8
54-
55-
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
56-
57-
# **findProductsToSubscribe**
58-
> \CyberSource\Model\InlineResponse2002[] findProductsToSubscribe($organizationId)
59-
60-
Find Products You Can Subscribe To
61-
62-
Retrieve a list of products and event types that your account is eligible for. These products and events are the ones that you may subscribe to in the next step of creating webhooks.
63-
64-
### Example
65-
```php
66-
<?php
67-
require_once(__DIR__ . '/vendor/autoload.php');
68-
69-
$api_instance = new CyberSource\Api\CreateNewWebhooksApi();
70-
$organizationId = "organizationId_example"; // string | The Organization Identifier.
71-
72-
try {
73-
$result = $api_instance->findProductsToSubscribe($organizationId);
74-
print_r($result);
75-
} catch (Exception $e) {
76-
echo 'Exception when calling CreateNewWebhooksApi->findProductsToSubscribe: ', $e->getMessage(), PHP_EOL;
77-
}
78-
?>
79-
```
80-
81-
### Parameters
82-
83-
Name | Type | Description | Notes
84-
------------- | ------------- | ------------- | -------------
85-
**organizationId** | **string**| The Organization Identifier. |
86-
87-
### Return type
88-
89-
[**\CyberSource\Model\InlineResponse2002[]**](../Model/InlineResponse2002.md)
90-
91-
### Authorization
92-
93-
No authorization required
94-
95-
### HTTP request headers
96-
97-
- **Content-Type**: application/json;charset=utf-8
98-
- **Accept**: application/json;charset=utf-8
99-
100-
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
101-
10210
# **saveSymEgressKey**
10311
> \CyberSource\Model\InlineResponse2013 saveSymEgressKey($vCSenderOrganizationId, $vCPermissions, $vCCorrelationId, $saveSymEgressKey)
10412
10513
Create Webhook Security Keys
10614

107-
Create security keys that CyberSource will use internally to connect to your servers and validate messages using a digital signature. Select the CREATE example for CyberSource to generate the key on our server and maintain it for you as well. Remeber to save the key in the API response, so that you can use it to validate messages later.
15+
Create security keys that CyberSource will use internally to connect to your servers and validate messages using a digital signature. Select the CREATE example for CyberSource to generate the key on our server and maintain it for you as well. Remember to save the key in the API response, so that you can use it to validate messages later.
10816

10917
### Example
11018
```php
@@ -146,7 +54,7 @@ No authorization required
14654
### HTTP request headers
14755

14856
- **Content-Type**: application/json;charset=utf-8
149-
- **Accept**: application/json;charset=utf-8
57+
- **Accept**: application/hal+json;charset=utf-8
15058

15159
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
15260

0 commit comments

Comments
 (0)