forked from LiveCarta/PayPal-PHP-Server-SDK
Automated commit message
This commit is contained in:
@@ -12,16 +12,110 @@ $ordersController = $client->getOrdersController();
|
||||
|
||||
## Methods
|
||||
|
||||
* [Orders Create](../../doc/controllers/orders.md#orders-create)
|
||||
* [Orders Get](../../doc/controllers/orders.md#orders-get)
|
||||
* [Orders Patch](../../doc/controllers/orders.md#orders-patch)
|
||||
* [Orders Confirm](../../doc/controllers/orders.md#orders-confirm)
|
||||
* [Orders Authorize](../../doc/controllers/orders.md#orders-authorize)
|
||||
* [Orders Capture](../../doc/controllers/orders.md#orders-capture)
|
||||
* [Orders Track Create](../../doc/controllers/orders.md#orders-track-create)
|
||||
* [Orders Create](../../doc/controllers/orders.md#orders-create)
|
||||
* [Orders Patch](../../doc/controllers/orders.md#orders-patch)
|
||||
* [Orders Capture](../../doc/controllers/orders.md#orders-capture)
|
||||
* [Orders Get](../../doc/controllers/orders.md#orders-get)
|
||||
* [Orders Confirm](../../doc/controllers/orders.md#orders-confirm)
|
||||
* [Orders Trackers Patch](../../doc/controllers/orders.md#orders-trackers-patch)
|
||||
|
||||
|
||||
# Orders Authorize
|
||||
|
||||
Authorizes payment for an order. To successfully authorize payment for an order, the buyer must first approve the order or a valid payment_source must be provided in the request. A buyer can approve the order upon being redirected to the rel:approve URL that was returned in the HATEOAS links in the create order response.<blockquote><strong>Note:</strong> For error handling and troubleshooting, see <a href="https://developer.paypal.com/api/rest/reference/orders/v2/errors/#authorize-order">Orders v2 errors</a>.</blockquote>
|
||||
|
||||
```php
|
||||
function ordersAuthorize(array $options): ApiResponse
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Tags | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `id` | `string` | Template, Required | The ID of the order for which to authorize.<br>**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9]+$` |
|
||||
| `paypalRequestId` | `?string` | Header, Optional | The server stores keys for 6 hours. The API callers can request the times to up to 72 hours by speaking to their Account Manager.<br>**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `108` |
|
||||
| `prefer` | `?string` | Header, Optional | The preferred server response upon successful completion of the request. Value is:<ul><li><code>return=minimal</code>. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the <code>id</code>, <code>status</code> and HATEOAS links.</li><li><code>return=representation</code>. The server returns a complete resource representation, including the current state of the resource.</li></ul><br>**Default**: `'return=minimal'`<br>**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `25`, *Pattern*: `^[a-zA-Z=,-]*$` |
|
||||
| `paypalClientMetadataId` | `?string` | Header, Optional | **Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` |
|
||||
| `paypalAuthAssertion` | `?string` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see <a href="https://developer.paypal.com/api/rest/requests/#paypal-auth-assertion">PayPal-Auth-Assertion</a>. |
|
||||
| `body` | [`?OrderAuthorizeRequest`](../../doc/models/order-authorize-request.md) | Body, Optional | - |
|
||||
|
||||
## Response Type
|
||||
|
||||
This method returns a `PaypalServerSdkLib\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`OrderAuthorizeResponse`](../../doc/models/order-authorize-response.md).
|
||||
|
||||
## Example Usage
|
||||
|
||||
```php
|
||||
$collect = [
|
||||
'id' => 'id0',
|
||||
'prefer' => 'return=minimal'
|
||||
];
|
||||
|
||||
$apiResponse = $ordersController->ordersAuthorize($collect);
|
||||
```
|
||||
|
||||
## Errors
|
||||
|
||||
| HTTP Status Code | Error Description | Exception Class |
|
||||
| --- | --- | --- |
|
||||
| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 403 | The authorized payment failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 404 | The specified resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
|
||||
|
||||
# Orders Track Create
|
||||
|
||||
Adds tracking information for an Order.
|
||||
|
||||
```php
|
||||
function ordersTrackCreate(array $options): ApiResponse
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Tags | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `id` | `string` | Template, Required | The ID of the order that the tracking information is associated with.<br>**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9]+$` |
|
||||
| `body` | [`OrderTrackerRequest`](../../doc/models/order-tracker-request.md) | Body, Required | - |
|
||||
| `paypalAuthAssertion` | `?string` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see <a href="https://developer.paypal.com/api/rest/requests/#paypal-auth-assertion">PayPal-Auth-Assertion</a>. |
|
||||
|
||||
## Response Type
|
||||
|
||||
This method returns a `PaypalServerSdkLib\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`Order`](../../doc/models/order.md).
|
||||
|
||||
## Example Usage
|
||||
|
||||
```php
|
||||
$collect = [
|
||||
'id' => 'id0',
|
||||
'body' => OrderTrackerRequestBuilder::init(
|
||||
'capture_id8'
|
||||
)
|
||||
->notifyPayer(false)
|
||||
->build()
|
||||
];
|
||||
|
||||
$apiResponse = $ordersController->ordersTrackCreate($collect);
|
||||
```
|
||||
|
||||
## Errors
|
||||
|
||||
| HTTP Status Code | Error Description | Exception Class |
|
||||
| --- | --- | --- |
|
||||
| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 403 | Authorization failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 404 | The specified resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
|
||||
|
||||
# Orders Create
|
||||
|
||||
Creates an order. Merchants and partners can add Level 2 and 3 data to payments to reduce risk and payment processing costs. For more information about processing payments, see <a href="https://developer.paypal.com/docs/checkout/advanced/processing/">checkout</a> or <a href="https://developer.paypal.com/docs/multiparty/checkout/advanced/processing/">multiparty checkout</a>.<blockquote><strong>Note:</strong> For error handling and troubleshooting, see <a href="https://developer.paypal.com/api/rest/reference/orders/v2/errors/#create-order">Orders v2 errors</a>.</blockquote>
|
||||
@@ -35,14 +129,14 @@ function ordersCreate(array $options): ApiResponse
|
||||
| Parameter | Type | Tags | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `body` | [`OrderRequest`](../../doc/models/order-request.md) | Body, Required | - |
|
||||
| `payPalRequestId` | `?string` | Header, Optional | The server stores keys for 6 hours. The API callers can request the times to up to 72 hours by speaking to their Account Manager.<br>**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `108` |
|
||||
| `payPalPartnerAttributionId` | `?string` | Header, Optional | **Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` |
|
||||
| `payPalClientMetadataId` | `?string` | Header, Optional | **Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` |
|
||||
| `paypalRequestId` | `?string` | Header, Optional | The server stores keys for 6 hours. The API callers can request the times to up to 72 hours by speaking to their Account Manager.<br>**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `108` |
|
||||
| `paypalPartnerAttributionId` | `?string` | Header, Optional | **Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` |
|
||||
| `paypalClientMetadataId` | `?string` | Header, Optional | **Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` |
|
||||
| `prefer` | `?string` | Header, Optional | The preferred server response upon successful completion of the request. Value is:<ul><li><code>return=minimal</code>. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the <code>id</code>, <code>status</code> and HATEOAS links.</li><li><code>return=representation</code>. The server returns a complete resource representation, including the current state of the resource.</li></ul><br>**Default**: `'return=minimal'`<br>**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `25`, *Pattern*: `^[a-zA-Z=,-]*$` |
|
||||
|
||||
## Response Type
|
||||
|
||||
This method returns a `PaypalServerSDKLib\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`Order`](../../doc/models/order.md).
|
||||
This method returns a `PaypalServerSdkLib\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`Order`](../../doc/models/order.md).
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -75,44 +169,6 @@ $apiResponse = $ordersController->ordersCreate($collect);
|
||||
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
|
||||
|
||||
# Orders Get
|
||||
|
||||
Shows details for an order, by ID.<blockquote><strong>Note:</strong> For error handling and troubleshooting, see <a href="https://developer.paypal.com/api/rest/reference/orders/v2/errors/#get-order">Orders v2 errors</a>.</blockquote>
|
||||
|
||||
```php
|
||||
function ordersGet(array $options): ApiResponse
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Tags | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `id` | `string` | Template, Required | The ID of the order for which to show details.<br>**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9]+$` |
|
||||
| `fields` | `?string` | Query, Optional | A comma-separated list of fields that should be returned for the order. Valid filter field is `payment_source`.<br>**Constraints**: *Pattern*: `^[a-z_]*$` |
|
||||
|
||||
## Response Type
|
||||
|
||||
This method returns a `PaypalServerSDKLib\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`Order`](../../doc/models/order.md).
|
||||
|
||||
## Example Usage
|
||||
|
||||
```php
|
||||
$collect = [
|
||||
'id' => 'id0'
|
||||
];
|
||||
|
||||
$apiResponse = $ordersController->ordersGet($collect);
|
||||
```
|
||||
|
||||
## Errors
|
||||
|
||||
| HTTP Status Code | Error Description | Exception Class |
|
||||
| --- | --- | --- |
|
||||
| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 404 | The specified resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
|
||||
|
||||
# Orders Patch
|
||||
|
||||
Updates an order with a `CREATED` or `APPROVED` status. You cannot update an order with the `COMPLETED` status.<br/><br/>To make an update, you must provide a `reference_id`. If you omit this value with an order that contains only one purchase unit, PayPal sets the value to `default` which enables you to use the path: <code>\"/purchase_units/@reference_id=='default'/{attribute-or-object}\"</code>. Merchants and partners can add Level 2 and 3 data to payments to reduce risk and payment processing costs. For more information about processing payments, see <a href="https://developer.paypal.com/docs/checkout/advanced/processing/">checkout</a> or <a href="https://developer.paypal.com/docs/multiparty/checkout/advanced/processing/">multiparty checkout</a>.<blockquote><strong>Note:</strong> For error handling and troubleshooting, see <a href="https://developer.paypal.com/api/rest/reference/orders/v2/errors/#patch-order">Orders v2 errors</a>.</blockquote>Patchable attributes or objects:<br/><br/><table><thead><th>Attribute</th><th>Op</th><th>Notes</th></thead><tbody><tr><td><code>intent</code></td><td>replace</td><td></td></tr><tr><td><code>payer</code></td><td>replace, add</td><td>Using replace op for <code>payer</code> will replace the whole <code>payer</code> object with the value sent in request.</td></tr><tr><td><code>purchase_units</code></td><td>replace, add</td><td></td></tr><tr><td><code>purchase_units[].custom_id</code></td><td>replace, add, remove</td><td></td></tr><tr><td><code>purchase_units[].description</code></td><td>replace, add, remove</td><td></td></tr><tr><td><code>purchase_units[].payee.email</code></td><td>replace</td><td></td></tr><tr><td><code>purchase_units[].shipping.name</code></td><td>replace, add</td><td></td></tr><tr><td><code>purchase_units[].shipping.email_address</code></td><td>replace, add</td><td></td></tr><tr><td><code>purchase_units[].shipping.phone_number</code></td><td>replace, add</td><td></td></tr><tr><td><code>purchase_units[].shipping.options</code></td><td>replace, add</td><td></td></tr><tr><td><code>purchase_units[].shipping.address</code></td><td>replace, add</td><td></td></tr><tr><td><code>purchase_units[].shipping.type</code></td><td>replace, add</td><td></td></tr><tr><td><code>purchase_units[].soft_descriptor</code></td><td>replace, remove</td><td></td></tr><tr><td><code>purchase_units[].amount</code></td><td>replace</td><td></td></tr><tr><td><code>purchase_units[].items</code></td><td>replace, add, remove</td><td></td></tr><tr><td><code>purchase_units[].invoice_id</code></td><td>replace, add, remove</td><td></td></tr><tr><td><code>purchase_units[].payment_instruction</code></td><td>replace</td><td></td></tr><tr><td><code>purchase_units[].payment_instruction.disbursement_mode</code></td><td>replace</td><td>By default, <code>disbursement_mode</code> is <code>INSTANT</code>.</td></tr><tr><td><code>purchase_units[].payment_instruction.payee_receivable_fx_rate_id</code></td><td>replace, add, remove</td><td></td></tr><tr><td><code>purchase_units[].payment_instruction.platform_fees</code></td><td>replace, add, remove</td><td></td></tr><tr><td><code>purchase_units[].supplementary_data.airline</code></td><td>replace, add, remove</td><td></td></tr><tr><td><code>purchase_units[].supplementary_data.card</code></td><td>replace, add, remove</td><td></td></tr><tr><td><code>application_context.client_configuration</code></td><td>replace, add</td><td></td></tr></tbody></table>
|
||||
@@ -130,7 +186,7 @@ function ordersPatch(array $options): ApiResponse
|
||||
|
||||
## Response Type
|
||||
|
||||
This method returns a `PaypalServerSDKLib\Utils\ApiResponse` instance.
|
||||
This method returns a `PaypalServerSdkLib\Utils\ApiResponse` instance.
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -158,6 +214,91 @@ $apiResponse = $ordersController->ordersPatch($collect);
|
||||
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
|
||||
|
||||
# Orders Capture
|
||||
|
||||
Captures payment for an order. To successfully capture payment for an order, the buyer must first approve the order or a valid payment_source must be provided in the request. A buyer can approve the order upon being redirected to the rel:approve URL that was returned in the HATEOAS links in the create order response.<blockquote><strong>Note:</strong> For error handling and troubleshooting, see <a href="https://developer.paypal.com/api/rest/reference/orders/v2/errors/#capture-order">Orders v2 errors</a>.</blockquote>
|
||||
|
||||
```php
|
||||
function ordersCapture(array $options): ApiResponse
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Tags | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `id` | `string` | Template, Required | The ID of the order for which to capture a payment.<br>**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9]+$` |
|
||||
| `paypalRequestId` | `?string` | Header, Optional | The server stores keys for 6 hours. The API callers can request the times to up to 72 hours by speaking to their Account Manager.<br>**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `108` |
|
||||
| `prefer` | `?string` | Header, Optional | The preferred server response upon successful completion of the request. Value is:<ul><li><code>return=minimal</code>. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the <code>id</code>, <code>status</code> and HATEOAS links.</li><li><code>return=representation</code>. The server returns a complete resource representation, including the current state of the resource.</li></ul><br>**Default**: `'return=minimal'`<br>**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `25`, *Pattern*: `^[a-zA-Z=,-]*$` |
|
||||
| `paypalClientMetadataId` | `?string` | Header, Optional | **Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` |
|
||||
| `paypalAuthAssertion` | `?string` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see <a href="https://developer.paypal.com/api/rest/requests/#paypal-auth-assertion">PayPal-Auth-Assertion</a>. |
|
||||
| `body` | [`?OrderCaptureRequest`](../../doc/models/order-capture-request.md) | Body, Optional | - |
|
||||
|
||||
## Response Type
|
||||
|
||||
This method returns a `PaypalServerSdkLib\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`Order`](../../doc/models/order.md).
|
||||
|
||||
## Example Usage
|
||||
|
||||
```php
|
||||
$collect = [
|
||||
'id' => 'id0',
|
||||
'prefer' => 'return=minimal'
|
||||
];
|
||||
|
||||
$apiResponse = $ordersController->ordersCapture($collect);
|
||||
```
|
||||
|
||||
## Errors
|
||||
|
||||
| HTTP Status Code | Error Description | Exception Class |
|
||||
| --- | --- | --- |
|
||||
| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 403 | The authorized payment failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 404 | The specified resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
|
||||
|
||||
# Orders Get
|
||||
|
||||
Shows details for an order, by ID.<blockquote><strong>Note:</strong> For error handling and troubleshooting, see <a href="https://developer.paypal.com/api/rest/reference/orders/v2/errors/#get-order">Orders v2 errors</a>.</blockquote>
|
||||
|
||||
```php
|
||||
function ordersGet(array $options): ApiResponse
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Tags | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `id` | `string` | Template, Required | The ID of the order for which to show details.<br>**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9]+$` |
|
||||
| `fields` | `?string` | Query, Optional | A comma-separated list of fields that should be returned for the order. Valid filter field is `payment_source`.<br>**Constraints**: *Pattern*: `^[a-z_]*$` |
|
||||
|
||||
## Response Type
|
||||
|
||||
This method returns a `PaypalServerSdkLib\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`Order`](../../doc/models/order.md).
|
||||
|
||||
## Example Usage
|
||||
|
||||
```php
|
||||
$collect = [
|
||||
'id' => 'id0'
|
||||
];
|
||||
|
||||
$apiResponse = $ordersController->ordersGet($collect);
|
||||
```
|
||||
|
||||
## Errors
|
||||
|
||||
| HTTP Status Code | Error Description | Exception Class |
|
||||
| --- | --- | --- |
|
||||
| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 404 | The specified resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
|
||||
|
||||
# Orders Confirm
|
||||
|
||||
Payer confirms their intent to pay for the the Order with the given payment source.
|
||||
@@ -171,13 +312,13 @@ function ordersConfirm(array $options): ApiResponse
|
||||
| Parameter | Type | Tags | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `id` | `string` | Template, Required | The ID of the order for which the payer confirms their intent to pay.<br>**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9]+$` |
|
||||
| `payPalClientMetadataId` | `?string` | Header, Optional | **Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` |
|
||||
| `paypalClientMetadataId` | `?string` | Header, Optional | **Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` |
|
||||
| `prefer` | `?string` | Header, Optional | The preferred server response upon successful completion of the request. Value is:<ul><li><code>return=minimal</code>. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the <code>id</code>, <code>status</code> and HATEOAS links.</li><li><code>return=representation</code>. The server returns a complete resource representation, including the current state of the resource.</li></ul><br>**Default**: `'return=minimal'`<br>**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `25`, *Pattern*: `^[a-zA-Z=]*$` |
|
||||
| `body` | [`?ConfirmOrderRequest`](../../doc/models/confirm-order-request.md) | Body, Optional | - |
|
||||
|
||||
## Response Type
|
||||
|
||||
This method returns a `PaypalServerSDKLib\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`Order`](../../doc/models/order.md).
|
||||
This method returns a `PaypalServerSdkLib\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`Order`](../../doc/models/order.md).
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -206,147 +347,6 @@ $apiResponse = $ordersController->ordersConfirm($collect);
|
||||
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
|
||||
|
||||
# Orders Authorize
|
||||
|
||||
Authorizes payment for an order. To successfully authorize payment for an order, the buyer must first approve the order or a valid payment_source must be provided in the request. A buyer can approve the order upon being redirected to the rel:approve URL that was returned in the HATEOAS links in the create order response.<blockquote><strong>Note:</strong> For error handling and troubleshooting, see <a href="https://developer.paypal.com/api/rest/reference/orders/v2/errors/#authorize-order">Orders v2 errors</a>.</blockquote>
|
||||
|
||||
```php
|
||||
function ordersAuthorize(array $options): ApiResponse
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Tags | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `id` | `string` | Template, Required | The ID of the order for which to authorize.<br>**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9]+$` |
|
||||
| `payPalRequestId` | `?string` | Header, Optional | The server stores keys for 6 hours. The API callers can request the times to up to 72 hours by speaking to their Account Manager.<br>**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `108` |
|
||||
| `prefer` | `?string` | Header, Optional | The preferred server response upon successful completion of the request. Value is:<ul><li><code>return=minimal</code>. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the <code>id</code>, <code>status</code> and HATEOAS links.</li><li><code>return=representation</code>. The server returns a complete resource representation, including the current state of the resource.</li></ul><br>**Default**: `'return=minimal'`<br>**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `25`, *Pattern*: `^[a-zA-Z=,-]*$` |
|
||||
| `payPalClientMetadataId` | `?string` | Header, Optional | **Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` |
|
||||
| `payPalAuthAssertion` | `?string` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see <a href="https://developer.paypal.com/api/rest/requests/#paypal-auth-assertion">PayPal-Auth-Assertion</a>. |
|
||||
| `body` | [`?OrderAuthorizeRequest`](../../doc/models/order-authorize-request.md) | Body, Optional | - |
|
||||
|
||||
## Response Type
|
||||
|
||||
This method returns a `PaypalServerSDKLib\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`OrderAuthorizeResponse`](../../doc/models/order-authorize-response.md).
|
||||
|
||||
## Example Usage
|
||||
|
||||
```php
|
||||
$collect = [
|
||||
'id' => 'id0',
|
||||
'prefer' => 'return=minimal'
|
||||
];
|
||||
|
||||
$apiResponse = $ordersController->ordersAuthorize($collect);
|
||||
```
|
||||
|
||||
## Errors
|
||||
|
||||
| HTTP Status Code | Error Description | Exception Class |
|
||||
| --- | --- | --- |
|
||||
| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 403 | The authorized payment failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 404 | The specified resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
|
||||
|
||||
# Orders Capture
|
||||
|
||||
Captures payment for an order. To successfully capture payment for an order, the buyer must first approve the order or a valid payment_source must be provided in the request. A buyer can approve the order upon being redirected to the rel:approve URL that was returned in the HATEOAS links in the create order response.<blockquote><strong>Note:</strong> For error handling and troubleshooting, see <a href="https://developer.paypal.com/api/rest/reference/orders/v2/errors/#capture-order">Orders v2 errors</a>.</blockquote>
|
||||
|
||||
```php
|
||||
function ordersCapture(array $options): ApiResponse
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Tags | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `id` | `string` | Template, Required | The ID of the order for which to capture a payment.<br>**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9]+$` |
|
||||
| `payPalRequestId` | `?string` | Header, Optional | The server stores keys for 6 hours. The API callers can request the times to up to 72 hours by speaking to their Account Manager.<br>**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `108` |
|
||||
| `prefer` | `?string` | Header, Optional | The preferred server response upon successful completion of the request. Value is:<ul><li><code>return=minimal</code>. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the <code>id</code>, <code>status</code> and HATEOAS links.</li><li><code>return=representation</code>. The server returns a complete resource representation, including the current state of the resource.</li></ul><br>**Default**: `'return=minimal'`<br>**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `25`, *Pattern*: `^[a-zA-Z=,-]*$` |
|
||||
| `payPalClientMetadataId` | `?string` | Header, Optional | **Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36` |
|
||||
| `payPalAuthAssertion` | `?string` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see <a href="https://developer.paypal.com/api/rest/requests/#paypal-auth-assertion">PayPal-Auth-Assertion</a>. |
|
||||
| `body` | [`?OrderCaptureRequest`](../../doc/models/order-capture-request.md) | Body, Optional | - |
|
||||
|
||||
## Response Type
|
||||
|
||||
This method returns a `PaypalServerSDKLib\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`Order`](../../doc/models/order.md).
|
||||
|
||||
## Example Usage
|
||||
|
||||
```php
|
||||
$collect = [
|
||||
'id' => 'id0',
|
||||
'prefer' => 'return=minimal'
|
||||
];
|
||||
|
||||
$apiResponse = $ordersController->ordersCapture($collect);
|
||||
```
|
||||
|
||||
## Errors
|
||||
|
||||
| HTTP Status Code | Error Description | Exception Class |
|
||||
| --- | --- | --- |
|
||||
| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 403 | The authorized payment failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 404 | The specified resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
|
||||
|
||||
# Orders Track Create
|
||||
|
||||
Adds tracking information for an Order.
|
||||
|
||||
```php
|
||||
function ordersTrackCreate(array $options): ApiResponse
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Tags | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `id` | `string` | Template, Required | The ID of the order that the tracking information is associated with.<br>**Constraints**: *Minimum Length*: `1`, *Maximum Length*: `36`, *Pattern*: `^[A-Z0-9]+$` |
|
||||
| `body` | [`OrderTrackerRequest`](../../doc/models/order-tracker-request.md) | Body, Required | - |
|
||||
| `payPalAuthAssertion` | `?string` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see <a href="https://developer.paypal.com/api/rest/requests/#paypal-auth-assertion">PayPal-Auth-Assertion</a>. |
|
||||
|
||||
## Response Type
|
||||
|
||||
This method returns a `PaypalServerSDKLib\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`Order`](../../doc/models/order.md).
|
||||
|
||||
## Example Usage
|
||||
|
||||
```php
|
||||
$collect = [
|
||||
'id' => 'id0',
|
||||
'body' => OrderTrackerRequestBuilder::init(
|
||||
'capture_id8'
|
||||
)
|
||||
->notifyPayer(false)
|
||||
->build()
|
||||
];
|
||||
|
||||
$apiResponse = $ordersController->ordersTrackCreate($collect);
|
||||
```
|
||||
|
||||
## Errors
|
||||
|
||||
| HTTP Status Code | Error Description | Exception Class |
|
||||
| --- | --- | --- |
|
||||
| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 403 | Authorization failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 404 | The specified resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
|
||||
|
||||
# Orders Trackers Patch
|
||||
|
||||
Updates or cancels the tracking information for a PayPal order, by ID. Updatable attributes or objects:<br/><br/><table><thead><th>Attribute</th><th>Op</th><th>Notes</th></thead><tbody></tr><tr><td><code>items</code></td><td>replace</td><td>Using replace op for <code>items</code> will replace the entire <code>items</code> object with the value sent in request.</td></tr><tr><td><code>notify_payer</code></td><td>replace, add</td><td></td></tr><tr><td><code>status</code></td><td>replace</td><td>Only patching status to CANCELLED is currently supported.</td></tr></tbody></table>
|
||||
@@ -365,7 +365,7 @@ function ordersTrackersPatch(array $options): ApiResponse
|
||||
|
||||
## Response Type
|
||||
|
||||
This method returns a `PaypalServerSDKLib\Utils\ApiResponse` instance.
|
||||
This method returns a `PaypalServerSdkLib\Utils\ApiResponse` instance.
|
||||
|
||||
## Example Usage
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ $paymentsController = $client->getPaymentsController();
|
||||
|
||||
* [Authorizations Get](../../doc/controllers/payments.md#authorizations-get)
|
||||
* [Authorizations Capture](../../doc/controllers/payments.md#authorizations-capture)
|
||||
* [Authorizations Reauthorize](../../doc/controllers/payments.md#authorizations-reauthorize)
|
||||
* [Authorizations Void](../../doc/controllers/payments.md#authorizations-void)
|
||||
* [Authorizations Reauthorize](../../doc/controllers/payments.md#authorizations-reauthorize)
|
||||
* [Captures Get](../../doc/controllers/payments.md#captures-get)
|
||||
* [Captures Refund](../../doc/controllers/payments.md#captures-refund)
|
||||
* [Refunds Get](../../doc/controllers/payments.md#refunds-get)
|
||||
@@ -37,7 +37,7 @@ function authorizationsGet(string $authorizationId): ApiResponse
|
||||
|
||||
## Response Type
|
||||
|
||||
This method returns a `PaypalServerSDKLib\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`PaymentAuthorization`](../../doc/models/payment-authorization.md).
|
||||
This method returns a `PaypalServerSdkLib\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`PaymentAuthorization`](../../doc/models/payment-authorization.md).
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -71,13 +71,13 @@ function authorizationsCapture(array $options): ApiResponse
|
||||
| Parameter | Type | Tags | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `authorizationId` | `string` | Template, Required | The PayPal-generated ID for the authorized payment to capture. |
|
||||
| `payPalRequestId` | `?string` | Header, Optional | The server stores keys for 45 days. |
|
||||
| `paypalRequestId` | `?string` | Header, Optional | The server stores keys for 45 days. |
|
||||
| `prefer` | `?string` | Header, Optional | The preferred server response upon successful completion of the request. Value is:<ul><li><code>return=minimal</code>. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the <code>id</code>, <code>status</code> and HATEOAS links.</li><li><code>return=representation</code>. The server returns a complete resource representation, including the current state of the resource.</li></ul><br>**Default**: `'return=minimal'` |
|
||||
| `body` | [`?CaptureRequest`](../../doc/models/capture-request.md) | Body, Optional | - |
|
||||
|
||||
## Response Type
|
||||
|
||||
This method returns a `PaypalServerSDKLib\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`CapturedPayment`](../../doc/models/captured-payment.md).
|
||||
This method returns a `PaypalServerSdkLib\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`CapturedPayment`](../../doc/models/captured-payment.md).
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -107,51 +107,6 @@ $apiResponse = $paymentsController->authorizationsCapture($collect);
|
||||
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
|
||||
|
||||
# Authorizations Reauthorize
|
||||
|
||||
Reauthorizes an authorized PayPal account payment, by ID. To ensure that funds are still available, reauthorize a payment after its initial three-day honor period expires. Within the 29-day authorization period, you can issue multiple re-authorizations after the honor period expires.<br/><br/>If 30 days have transpired since the date of the original authorization, you must create an authorized payment instead of reauthorizing the original authorized payment.<br/><br/>A reauthorized payment itself has a new honor period of three days.<br/><br/>You can reauthorize an authorized payment from 4 to 29 days after the 3-day honor period. The allowed amount depends on context and geography, for example in US it is up to 115% of the original authorized amount, not to exceed an increase of $75 USD.<br/><br/>Supports only the `amount` request parameter.<blockquote><strong>Note:</strong> This request is currently not supported for Partner use cases.</blockquote>
|
||||
|
||||
```php
|
||||
function authorizationsReauthorize(array $options): ApiResponse
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Tags | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `authorizationId` | `string` | Template, Required | The PayPal-generated ID for the authorized payment to reauthorize. |
|
||||
| `payPalRequestId` | `?string` | Header, Optional | The server stores keys for 45 days. |
|
||||
| `prefer` | `?string` | Header, Optional | The preferred server response upon successful completion of the request. Value is:<ul><li><code>return=minimal</code>. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the <code>id</code>, <code>status</code> and HATEOAS links.</li><li><code>return=representation</code>. The server returns a complete resource representation, including the current state of the resource.</li></ul><br>**Default**: `'return=minimal'` |
|
||||
| `body` | [`?ReauthorizeRequest`](../../doc/models/reauthorize-request.md) | Body, Optional | - |
|
||||
|
||||
## Response Type
|
||||
|
||||
This method returns a `PaypalServerSDKLib\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`PaymentAuthorization`](../../doc/models/payment-authorization.md).
|
||||
|
||||
## Example Usage
|
||||
|
||||
```php
|
||||
$collect = [
|
||||
'authorizationId' => 'authorization_id8',
|
||||
'prefer' => 'return=minimal'
|
||||
];
|
||||
|
||||
$apiResponse = $paymentsController->authorizationsReauthorize($collect);
|
||||
```
|
||||
|
||||
## Errors
|
||||
|
||||
| HTTP Status Code | Error Description | Exception Class |
|
||||
| --- | --- | --- |
|
||||
| 400 | The request failed because it is not well-formed or is syntactically incorrect or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 403 | The request failed because the caller has insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 404 | The request failed because the resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 422 | The request failed because it either is semantically incorrect or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 500 | The request failed because an internal server error occurred. | `ApiException` |
|
||||
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
|
||||
|
||||
# Authorizations Void
|
||||
|
||||
Voids, or cancels, an authorized payment, by ID. You cannot void an authorized payment that has been fully captured.
|
||||
@@ -165,12 +120,12 @@ function authorizationsVoid(array $options): ApiResponse
|
||||
| Parameter | Type | Tags | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `authorizationId` | `string` | Template, Required | The PayPal-generated ID for the authorized payment to void. |
|
||||
| `payPalAuthAssertion` | `?string` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see [PayPal-Auth-Assertion](/docs/api/reference/api-requests/#paypal-auth-assertion).<blockquote><strong>Note:</strong>For three party transactions in which a partner is managing the API calls on behalf of a merchant, the partner must identify the merchant using either a PayPal-Auth-Assertion header or an access token with target_subject.</blockquote> |
|
||||
| `paypalAuthAssertion` | `?string` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see [PayPal-Auth-Assertion](/docs/api/reference/api-requests/#paypal-auth-assertion).<blockquote><strong>Note:</strong>For three party transactions in which a partner is managing the API calls on behalf of a merchant, the partner must identify the merchant using either a PayPal-Auth-Assertion header or an access token with target_subject.</blockquote> |
|
||||
| `prefer` | `?string` | Header, Optional | The preferred server response upon successful completion of the request. Value is:<ul><li><code>return=minimal</code>. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the <code>id</code>, <code>status</code> and HATEOAS links.</li><li><code>return=representation</code>. The server returns a complete resource representation, including the current state of the resource.</li></ul><br>**Default**: `'return=minimal'` |
|
||||
|
||||
## Response Type
|
||||
|
||||
This method returns a `PaypalServerSDKLib\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`?PaymentAuthorization`](../../doc/models/payment-authorization.md).
|
||||
This method returns a `PaypalServerSdkLib\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`?PaymentAuthorization`](../../doc/models/payment-authorization.md).
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -197,6 +152,51 @@ $apiResponse = $paymentsController->authorizationsVoid($collect);
|
||||
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
|
||||
|
||||
# Authorizations Reauthorize
|
||||
|
||||
Reauthorizes an authorized PayPal account payment, by ID. To ensure that funds are still available, reauthorize a payment after its initial three-day honor period expires. Within the 29-day authorization period, you can issue multiple re-authorizations after the honor period expires.<br/><br/>If 30 days have transpired since the date of the original authorization, you must create an authorized payment instead of reauthorizing the original authorized payment.<br/><br/>A reauthorized payment itself has a new honor period of three days.<br/><br/>You can reauthorize an authorized payment from 4 to 29 days after the 3-day honor period. The allowed amount depends on context and geography, for example in US it is up to 115% of the original authorized amount, not to exceed an increase of $75 USD.<br/><br/>Supports only the `amount` request parameter.<blockquote><strong>Note:</strong> This request is currently not supported for Partner use cases.</blockquote>
|
||||
|
||||
```php
|
||||
function authorizationsReauthorize(array $options): ApiResponse
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Tags | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `authorizationId` | `string` | Template, Required | The PayPal-generated ID for the authorized payment to reauthorize. |
|
||||
| `paypalRequestId` | `?string` | Header, Optional | The server stores keys for 45 days. |
|
||||
| `prefer` | `?string` | Header, Optional | The preferred server response upon successful completion of the request. Value is:<ul><li><code>return=minimal</code>. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the <code>id</code>, <code>status</code> and HATEOAS links.</li><li><code>return=representation</code>. The server returns a complete resource representation, including the current state of the resource.</li></ul><br>**Default**: `'return=minimal'` |
|
||||
| `body` | [`?ReauthorizeRequest`](../../doc/models/reauthorize-request.md) | Body, Optional | - |
|
||||
|
||||
## Response Type
|
||||
|
||||
This method returns a `PaypalServerSdkLib\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`PaymentAuthorization`](../../doc/models/payment-authorization.md).
|
||||
|
||||
## Example Usage
|
||||
|
||||
```php
|
||||
$collect = [
|
||||
'authorizationId' => 'authorization_id8',
|
||||
'prefer' => 'return=minimal'
|
||||
];
|
||||
|
||||
$apiResponse = $paymentsController->authorizationsReauthorize($collect);
|
||||
```
|
||||
|
||||
## Errors
|
||||
|
||||
| HTTP Status Code | Error Description | Exception Class |
|
||||
| --- | --- | --- |
|
||||
| 400 | The request failed because it is not well-formed or is syntactically incorrect or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 401 | Authentication failed due to missing authorization header, or invalid authentication credentials. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 403 | The request failed because the caller has insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 404 | The request failed because the resource does not exist. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 422 | The request failed because it either is semantically incorrect or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 500 | The request failed because an internal server error occurred. | `ApiException` |
|
||||
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
|
||||
|
||||
# Captures Get
|
||||
|
||||
Shows details for a captured payment, by ID.
|
||||
@@ -213,7 +213,7 @@ function capturesGet(string $captureId): ApiResponse
|
||||
|
||||
## Response Type
|
||||
|
||||
This method returns a `PaypalServerSDKLib\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`CapturedPayment`](../../doc/models/captured-payment.md).
|
||||
This method returns a `PaypalServerSdkLib\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`CapturedPayment`](../../doc/models/captured-payment.md).
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -247,14 +247,14 @@ function capturesRefund(array $options): ApiResponse
|
||||
| Parameter | Type | Tags | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `captureId` | `string` | Template, Required | The PayPal-generated ID for the captured payment to refund. |
|
||||
| `payPalRequestId` | `?string` | Header, Optional | The server stores keys for 45 days. |
|
||||
| `paypalRequestId` | `?string` | Header, Optional | The server stores keys for 45 days. |
|
||||
| `prefer` | `?string` | Header, Optional | The preferred server response upon successful completion of the request. Value is:<ul><li><code>return=minimal</code>. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the <code>id</code>, <code>status</code> and HATEOAS links.</li><li><code>return=representation</code>. The server returns a complete resource representation, including the current state of the resource.</li></ul><br>**Default**: `'return=minimal'` |
|
||||
| `payPalAuthAssertion` | `?string` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see [PayPal-Auth-Assertion](/docs/api/reference/api-requests/#paypal-auth-assertion).<blockquote><strong>Note:</strong>For three party transactions in which a partner is managing the API calls on behalf of a merchant, the partner must identify the merchant using either a PayPal-Auth-Assertion header or an access token with target_subject.</blockquote> |
|
||||
| `paypalAuthAssertion` | `?string` | Header, Optional | An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see [PayPal-Auth-Assertion](/docs/api/reference/api-requests/#paypal-auth-assertion).<blockquote><strong>Note:</strong>For three party transactions in which a partner is managing the API calls on behalf of a merchant, the partner must identify the merchant using either a PayPal-Auth-Assertion header or an access token with target_subject.</blockquote> |
|
||||
| `body` | [`?RefundRequest`](../../doc/models/refund-request.md) | Body, Optional | - |
|
||||
|
||||
## Response Type
|
||||
|
||||
This method returns a `PaypalServerSDKLib\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`Refund`](../../doc/models/refund.md).
|
||||
This method returns a `PaypalServerSdkLib\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`Refund`](../../doc/models/refund.md).
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -297,7 +297,7 @@ function refundsGet(string $refundId): ApiResponse
|
||||
|
||||
## Response Type
|
||||
|
||||
This method returns a `PaypalServerSDKLib\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`Refund`](../../doc/models/refund.md).
|
||||
This method returns a `PaypalServerSdkLib\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`Refund`](../../doc/models/refund.md).
|
||||
|
||||
## Example Usage
|
||||
|
||||
|
||||
@@ -12,57 +12,14 @@ $vaultController = $client->getVaultController();
|
||||
|
||||
## Methods
|
||||
|
||||
* [Payment-Tokens Create](../../doc/controllers/vault.md#payment-tokens-create)
|
||||
* [Customer Payment-Tokens Get](../../doc/controllers/vault.md#customer-payment-tokens-get)
|
||||
* [Payment-Tokens Get](../../doc/controllers/vault.md#payment-tokens-get)
|
||||
* [Payment-Tokens Delete](../../doc/controllers/vault.md#payment-tokens-delete)
|
||||
* [Payment-Tokens Create](../../doc/controllers/vault.md#payment-tokens-create)
|
||||
* [Setup-Tokens Create](../../doc/controllers/vault.md#setup-tokens-create)
|
||||
* [Payment-Tokens Delete](../../doc/controllers/vault.md#payment-tokens-delete)
|
||||
* [Setup-Tokens Get](../../doc/controllers/vault.md#setup-tokens-get)
|
||||
|
||||
|
||||
# Payment-Tokens Create
|
||||
|
||||
Creates a Payment Token from the given payment source and adds it to the Vault of the associated customer.
|
||||
|
||||
```php
|
||||
function paymentTokensCreate(array $options): ApiResponse
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Tags | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `payPalRequestId` | `string` | Header, Required | The server stores keys for 3 hours. |
|
||||
| `body` | [`PaymentTokenRequest`](../../doc/models/payment-token-request.md) | Body, Required | Payment Token creation with a financial instrument and an optional customer_id. |
|
||||
|
||||
## Response Type
|
||||
|
||||
This method returns a `PaypalServerSDKLib\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`PaymentTokenResponse`](../../doc/models/payment-token-response.md).
|
||||
|
||||
## Example Usage
|
||||
|
||||
```php
|
||||
$collect = [
|
||||
'payPalRequestId' => 'PayPal-Request-Id6',
|
||||
'body' => PaymentTokenRequestBuilder::init(
|
||||
PaymentTokenRequestPaymentSourceBuilder::init()->build()
|
||||
)->build()
|
||||
];
|
||||
|
||||
$apiResponse = $vaultController->paymentTokensCreate($collect);
|
||||
```
|
||||
|
||||
## Errors
|
||||
|
||||
| HTTP Status Code | Error Description | Exception Class |
|
||||
| --- | --- | --- |
|
||||
| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 403 | Authorization failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 404 | Request contains reference to resources that do not exist. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
|
||||
|
||||
# Customer Payment-Tokens Get
|
||||
|
||||
Returns all payment tokens for a customer.
|
||||
@@ -82,7 +39,7 @@ function customerPaymentTokensGet(array $options): ApiResponse
|
||||
|
||||
## Response Type
|
||||
|
||||
This method returns a `PaypalServerSDKLib\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`CustomerVaultPaymentTokensResponse`](../../doc/models/customer-vault-payment-tokens-response.md).
|
||||
This method returns a `PaypalServerSdkLib\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`CustomerVaultPaymentTokensResponse`](../../doc/models/customer-vault-payment-tokens-response.md).
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -122,7 +79,7 @@ function paymentTokensGet(string $id): ApiResponse
|
||||
|
||||
## Response Type
|
||||
|
||||
This method returns a `PaypalServerSDKLib\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`PaymentTokenResponse`](../../doc/models/payment-token-response.md).
|
||||
This method returns a `PaypalServerSdkLib\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`PaymentTokenResponse`](../../doc/models/payment-token-response.md).
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -142,6 +99,91 @@ $apiResponse = $vaultController->paymentTokensGet($id);
|
||||
| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
|
||||
|
||||
# Payment-Tokens Create
|
||||
|
||||
Creates a Payment Token from the given payment source and adds it to the Vault of the associated customer.
|
||||
|
||||
```php
|
||||
function paymentTokensCreate(array $options): ApiResponse
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Tags | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `paypalRequestId` | `string` | Header, Required | The server stores keys for 3 hours. |
|
||||
| `body` | [`PaymentTokenRequest`](../../doc/models/payment-token-request.md) | Body, Required | Payment Token creation with a financial instrument and an optional customer_id. |
|
||||
|
||||
## Response Type
|
||||
|
||||
This method returns a `PaypalServerSdkLib\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`PaymentTokenResponse`](../../doc/models/payment-token-response.md).
|
||||
|
||||
## Example Usage
|
||||
|
||||
```php
|
||||
$collect = [
|
||||
'paypalRequestId' => 'PayPal-Request-Id6',
|
||||
'body' => PaymentTokenRequestBuilder::init(
|
||||
PaymentTokenRequestPaymentSourceBuilder::init()->build()
|
||||
)->build()
|
||||
];
|
||||
|
||||
$apiResponse = $vaultController->paymentTokensCreate($collect);
|
||||
```
|
||||
|
||||
## Errors
|
||||
|
||||
| HTTP Status Code | Error Description | Exception Class |
|
||||
| --- | --- | --- |
|
||||
| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 403 | Authorization failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 404 | Request contains reference to resources that do not exist. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
|
||||
|
||||
# Setup-Tokens Create
|
||||
|
||||
Creates a Setup Token from the given payment source and adds it to the Vault of the associated customer.
|
||||
|
||||
```php
|
||||
function setupTokensCreate(array $options): ApiResponse
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Tags | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `paypalRequestId` | `string` | Header, Required | The server stores keys for 3 hours. |
|
||||
| `body` | [`SetupTokenRequest`](../../doc/models/setup-token-request.md) | Body, Required | Setup Token creation with a instrument type optional financial instrument details and customer_id. |
|
||||
|
||||
## Response Type
|
||||
|
||||
This method returns a `PaypalServerSdkLib\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`SetupTokenResponse`](../../doc/models/setup-token-response.md).
|
||||
|
||||
## Example Usage
|
||||
|
||||
```php
|
||||
$collect = [
|
||||
'paypalRequestId' => 'PayPal-Request-Id6',
|
||||
'body' => SetupTokenRequestBuilder::init(
|
||||
SetupTokenRequestPaymentSourceBuilder::init()->build()
|
||||
)->build()
|
||||
];
|
||||
|
||||
$apiResponse = $vaultController->setupTokensCreate($collect);
|
||||
```
|
||||
|
||||
## Errors
|
||||
|
||||
| HTTP Status Code | Error Description | Exception Class |
|
||||
| --- | --- | --- |
|
||||
| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 403 | Authorization failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
|
||||
|
||||
# Payment-Tokens Delete
|
||||
|
||||
Delete the payment token associated with the payment token id.
|
||||
@@ -158,7 +200,7 @@ function paymentTokensDelete(string $id): ApiResponse
|
||||
|
||||
## Response Type
|
||||
|
||||
This method returns a `PaypalServerSDKLib\Utils\ApiResponse` instance.
|
||||
This method returns a `PaypalServerSdkLib\Utils\ApiResponse` instance.
|
||||
|
||||
## Example Usage
|
||||
|
||||
@@ -177,48 +219,6 @@ $apiResponse = $vaultController->paymentTokensDelete($id);
|
||||
| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
|
||||
|
||||
# Setup-Tokens Create
|
||||
|
||||
Creates a Setup Token from the given payment source and adds it to the Vault of the associated customer.
|
||||
|
||||
```php
|
||||
function setupTokensCreate(array $options): ApiResponse
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Tags | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `payPalRequestId` | `string` | Header, Required | The server stores keys for 3 hours. |
|
||||
| `body` | [`SetupTokenRequest`](../../doc/models/setup-token-request.md) | Body, Required | Setup Token creation with a instrument type optional financial instrument details and customer_id. |
|
||||
|
||||
## Response Type
|
||||
|
||||
This method returns a `PaypalServerSDKLib\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`SetupTokenResponse`](../../doc/models/setup-token-response.md).
|
||||
|
||||
## Example Usage
|
||||
|
||||
```php
|
||||
$collect = [
|
||||
'payPalRequestId' => 'PayPal-Request-Id6',
|
||||
'body' => SetupTokenRequestBuilder::init(
|
||||
SetupTokenRequestPaymentSourceBuilder::init()->build()
|
||||
)->build()
|
||||
];
|
||||
|
||||
$apiResponse = $vaultController->setupTokensCreate($collect);
|
||||
```
|
||||
|
||||
## Errors
|
||||
|
||||
| HTTP Status Code | Error Description | Exception Class |
|
||||
| --- | --- | --- |
|
||||
| 400 | Request is not well-formed, syntactically incorrect, or violates schema. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 403 | Authorization failed due to insufficient permissions. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 422 | The requested action could not be performed, semantically incorrect, or failed business validation. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
| 500 | An internal server error has occurred. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
|
||||
|
||||
# Setup-Tokens Get
|
||||
|
||||
Returns a readable representation of temporarily vaulted payment source associated with the setup token id.
|
||||
@@ -235,7 +235,7 @@ function setupTokensGet(string $id): ApiResponse
|
||||
|
||||
## Response Type
|
||||
|
||||
This method returns a `PaypalServerSDKLib\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`SetupTokenResponse`](../../doc/models/setup-token-response.md).
|
||||
This method returns a `PaypalServerSdkLib\Utils\ApiResponse` instance. The `getResult()` method on this instance returns the response data which is of type [`SetupTokenResponse`](../../doc/models/setup-token-response.md).
|
||||
|
||||
## Example Usage
|
||||
|
||||
|
||||
Reference in New Issue
Block a user