forked from LiveCarta/PayPal-PHP-Server-SDK
2.0.0 Release (#58)
* Automated commit message * Automated commit message * add changelog --------- Co-authored-by: PayPalServerSDKs <server-sdks@paypal.com>
This commit is contained in:
@@ -12,15 +12,56 @@ $paymentsController = $client->getPaymentsController();
|
||||
|
||||
## Methods
|
||||
|
||||
* [Get Authorized Payment](../../doc/controllers/payments.md#get-authorized-payment)
|
||||
* [Capture Authorized Payment](../../doc/controllers/payments.md#capture-authorized-payment)
|
||||
* [Get Captured Payment](../../doc/controllers/payments.md#get-captured-payment)
|
||||
* [Reauthorize Payment](../../doc/controllers/payments.md#reauthorize-payment)
|
||||
* [Void Payment](../../doc/controllers/payments.md#void-payment)
|
||||
* [Get Captured Payment](../../doc/controllers/payments.md#get-captured-payment)
|
||||
* [Refund Captured Payment](../../doc/controllers/payments.md#refund-captured-payment)
|
||||
* [Get Authorized Payment](../../doc/controllers/payments.md#get-authorized-payment)
|
||||
* [Get Refund](../../doc/controllers/payments.md#get-refund)
|
||||
|
||||
|
||||
# Get Authorized Payment
|
||||
|
||||
Shows details for an authorized payment, by ID.
|
||||
|
||||
```php
|
||||
function getAuthorizedPayment(array $options): ApiResponse
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Tags | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `authorizationId` | `string` | Template, Required | The ID of the authorized payment for which to show details. |
|
||||
| `paypalMockResponse` | `?string` | Header, Optional | PayPal's REST API uses a request header to invoke negative testing in the sandbox. This header configures the sandbox into a negative testing state for transactions that include the merchant. |
|
||||
| `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). Note: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. |
|
||||
|
||||
## Response Type
|
||||
|
||||
This method returns an [`ApiResponse`](../../doc/api-response.md) 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'
|
||||
];
|
||||
|
||||
$apiResponse = $paymentsController->getAuthorizedPayment($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) |
|
||||
| 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) |
|
||||
| 500 | The request failed because an internal server error occurred. | `ApiException` |
|
||||
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
|
||||
|
||||
# Capture Authorized Payment
|
||||
|
||||
Captures an authorized payment, by ID.
|
||||
@@ -72,49 +113,9 @@ $apiResponse = $paymentsController->captureAuthorizedPayment($collect);
|
||||
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
|
||||
|
||||
# Get Captured Payment
|
||||
|
||||
Shows details for a captured payment, by ID.
|
||||
|
||||
```php
|
||||
function getCapturedPayment(array $options): ApiResponse
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Tags | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `captureId` | `string` | Template, Required | The PayPal-generated ID for the captured payment for which to show details. |
|
||||
| `paypalMockResponse` | `?string` | Header, Optional | PayPal's REST API uses a request header to invoke negative testing in the sandbox. This header configures the sandbox into a negative testing state for transactions that include the merchant. |
|
||||
|
||||
## Response Type
|
||||
|
||||
This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `getResult()` method on this instance returns the response data which is of type [`CapturedPayment`](../../doc/models/captured-payment.md).
|
||||
|
||||
## Example Usage
|
||||
|
||||
```php
|
||||
$collect = [
|
||||
'captureId' => 'capture_id2'
|
||||
];
|
||||
|
||||
$apiResponse = $paymentsController->getCapturedPayment($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) |
|
||||
| 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) |
|
||||
| 500 | The request failed because an internal server error occurred. | `ApiException` |
|
||||
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
|
||||
|
||||
# Reauthorize Payment
|
||||
|
||||
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. 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. A reauthorized payment itself has a new honor period of three days. 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. Supports only the `amount` request parameter. Note: This request is currently not supported for Partner use cases.
|
||||
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. 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. A reauthorized payment itself has a new honor period of three days. 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. Supports only the `amount` request parameter.
|
||||
|
||||
```php
|
||||
function reauthorizePayment(array $options): ApiResponse
|
||||
@@ -151,6 +152,7 @@ $apiResponse = $paymentsController->reauthorizePayment($collect);
|
||||
| --- | --- | --- |
|
||||
| 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` |
|
||||
@@ -203,6 +205,46 @@ $apiResponse = $paymentsController->voidPayment($collect);
|
||||
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
|
||||
|
||||
# Get Captured Payment
|
||||
|
||||
Shows details for a captured payment, by ID.
|
||||
|
||||
```php
|
||||
function getCapturedPayment(array $options): ApiResponse
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Tags | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `captureId` | `string` | Template, Required | The PayPal-generated ID for the captured payment for which to show details. |
|
||||
| `paypalMockResponse` | `?string` | Header, Optional | PayPal's REST API uses a request header to invoke negative testing in the sandbox. This header configures the sandbox into a negative testing state for transactions that include the merchant. |
|
||||
|
||||
## Response Type
|
||||
|
||||
This method returns an [`ApiResponse`](../../doc/api-response.md) instance. The `getResult()` method on this instance returns the response data which is of type [`CapturedPayment`](../../doc/models/captured-payment.md).
|
||||
|
||||
## Example Usage
|
||||
|
||||
```php
|
||||
$collect = [
|
||||
'captureId' => 'capture_id2'
|
||||
];
|
||||
|
||||
$apiResponse = $paymentsController->getCapturedPayment($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) |
|
||||
| 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) |
|
||||
| 500 | The request failed because an internal server error occurred. | `ApiException` |
|
||||
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
|
||||
|
||||
# Refund Captured Payment
|
||||
|
||||
Refunds a captured payment, by ID. For a full refund, include an empty payload in the JSON request body. For a partial refund, include an amount object in the JSON request body.
|
||||
@@ -251,46 +293,6 @@ $apiResponse = $paymentsController->refundCapturedPayment($collect);
|
||||
| Default | The error response. | [`ErrorException`](../../doc/models/error-exception.md) |
|
||||
|
||||
|
||||
# Get Authorized Payment
|
||||
|
||||
Shows details for an authorized payment, by ID.
|
||||
|
||||
```php
|
||||
function getAuthorizedPayment(array $options): ApiResponse
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Tags | Description |
|
||||
| --- | --- | --- | --- |
|
||||
| `authorizationId` | `string` | Template, Required | The ID of the authorized payment for which to show details. |
|
||||
| `paypalMockResponse` | `?string` | Header, Optional | PayPal's REST API uses a request header to invoke negative testing in the sandbox. This header configures the sandbox into a negative testing state for transactions that include the merchant. |
|
||||
| `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). Note: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. |
|
||||
|
||||
## Response Type
|
||||
|
||||
This method returns an [`ApiResponse`](../../doc/api-response.md) 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'
|
||||
];
|
||||
|
||||
$apiResponse = $paymentsController->getAuthorizedPayment($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 request failed because the resource does not exist. | [`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) |
|
||||
|
||||
|
||||
# Get Refund
|
||||
|
||||
Shows details for a refund, by ID.
|
||||
|
||||
Reference in New Issue
Block a user