diff --git a/LICENSE b/LICENSE index 0d37b6c..74911bc 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2017-2023 Xendit +Copyright (c) 2017-2024 Xendit Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index b623e4a..91b5927 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ The official Xendit PHP SDK provides a simple and convenient way to call Xendit's REST API in applications written in PHP. -* Package version: 4.1.0 +* Package version: 4.2.0 # Getting Started @@ -28,7 +28,7 @@ To install the bindings via [Composer](https://getcomposer.org/), add the follow } ], "require": { - "xendit/xendit-php": "4.1.0" + "xendit/xendit-php": "4.2.0" } } ``` diff --git a/composer.json b/composer.json index a9267c7..5012aef 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "xendit/xendit-php", - "version": "4.1.0", + "version": "4.2.0", "description": "Xendit PHP SDK", "keywords": [ "openapitools", diff --git a/docs/Refund/RefundCallbackData.md b/docs/Refund/RefundCallbackData.md index 2f42b5a..bd86322 100644 --- a/docs/Refund/RefundCallbackData.md +++ b/docs/Refund/RefundCallbackData.md @@ -10,7 +10,7 @@ use Xendit\Refund\RefundCallbackData; | Name | Type | Required | Description | Examples | |------------|:-------------:|:-------------:|-------------|:-------------:| | **id** | **string** | ☑️ | | rfd-3ece8615-41b7-4983-a3f0-a037430b6036 | -| **payment_request_id** | **string** | ☑️ | | pr-f4a6f77c-4835-4630-9617-2cdc34ee26ee | +| **payment_id** | **string** | ☑️ | | pr-f4a6f77c-4835-4630-9617-2cdc34ee26ee | | **invoice_id** | **string** | | | null | | **payment_method_type** | **string** | ☑️ | | null | | **amount** | **float** | ☑️ | | 1500 | diff --git a/lib/BalanceAndTransaction/BalanceApi.php b/lib/BalanceAndTransaction/BalanceApi.php index 1e70105..cc9fe41 100644 --- a/lib/BalanceAndTransaction/BalanceApi.php +++ b/lib/BalanceAndTransaction/BalanceApi.php @@ -367,7 +367,7 @@ public function getBalanceRequest($account_type = 'CASH', $currency = null, $for // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.1.0'; + $defaultHeaders['xendit-lib-ver'] = '4.2.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); diff --git a/lib/BalanceAndTransaction/TransactionApi.php b/lib/BalanceAndTransaction/TransactionApi.php index 06a912c..f31dfb9 100644 --- a/lib/BalanceAndTransaction/TransactionApi.php +++ b/lib/BalanceAndTransaction/TransactionApi.php @@ -363,7 +363,7 @@ public function getTransactionByIDRequest($id, $for_user_id = null, string $cont // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.1.0'; + $defaultHeaders['xendit-lib-ver'] = '4.2.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -806,7 +806,7 @@ public function getAllTransactionsRequest($for_user_id = null, $types = null, $s // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.1.0'; + $defaultHeaders['xendit-lib-ver'] = '4.2.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); diff --git a/lib/Configuration.php b/lib/Configuration.php index 361e90c..8136625 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -64,7 +64,7 @@ class Configuration * * @var string */ - protected $userAgent = 'OpenAPI-Generator/4.1.0/PHP'; + protected $userAgent = 'OpenAPI-Generator/4.2.0/PHP'; /** * Debug switch (default set to false) @@ -305,7 +305,7 @@ public static function toDebugReport() $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; $report .= ' The version of the OpenAPI document: 1.45.2' . PHP_EOL; - $report .= ' SDK Package Version: 4.1.0' . PHP_EOL; + $report .= ' SDK Package Version: 4.2.0' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/lib/Customer/CustomerApi.php b/lib/Customer/CustomerApi.php index 152a152..135c7a9 100644 --- a/lib/Customer/CustomerApi.php +++ b/lib/Customer/CustomerApi.php @@ -369,7 +369,7 @@ public function createCustomerRequest($idempotency_key = null, $for_user_id = nu // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.1.0'; + $defaultHeaders['xendit-lib-ver'] = '4.2.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -628,7 +628,7 @@ public function getCustomerRequest($id, $for_user_id = null, string $contentType // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.1.0'; + $defaultHeaders['xendit-lib-ver'] = '4.2.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -891,7 +891,7 @@ public function getCustomerByReferenceIDRequest($reference_id, $for_user_id = nu // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.1.0'; + $defaultHeaders['xendit-lib-ver'] = '4.2.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1163,7 +1163,7 @@ public function updateCustomerRequest($id, $for_user_id = null, $patch_customer // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.1.0'; + $defaultHeaders['xendit-lib-ver'] = '4.2.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); diff --git a/lib/Invoice/InvoiceApi.php b/lib/Invoice/InvoiceApi.php index be4319f..255bf56 100644 --- a/lib/Invoice/InvoiceApi.php +++ b/lib/Invoice/InvoiceApi.php @@ -365,7 +365,7 @@ public function createInvoiceRequest($create_invoice_request, $for_user_id = nul // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.1.0'; + $defaultHeaders['xendit-lib-ver'] = '4.2.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -624,7 +624,7 @@ public function getInvoiceByIdRequest($invoice_id, $for_user_id = null, string $ // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.1.0'; + $defaultHeaders['xendit-lib-ver'] = '4.2.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1073,7 +1073,7 @@ public function getInvoicesRequest($for_user_id = null, $external_id = null, $st // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.1.0'; + $defaultHeaders['xendit-lib-ver'] = '4.2.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1332,7 +1332,7 @@ public function expireInvoiceRequest($invoice_id, $for_user_id = null, string $c // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.1.0'; + $defaultHeaders['xendit-lib-ver'] = '4.2.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); diff --git a/lib/PaymentMethod/PaymentMethodApi.php b/lib/PaymentMethod/PaymentMethodApi.php index 2c8bc8e..457a184 100644 --- a/lib/PaymentMethod/PaymentMethodApi.php +++ b/lib/PaymentMethod/PaymentMethodApi.php @@ -371,7 +371,7 @@ public function createPaymentMethodRequest($for_user_id = null, $payment_method_ // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.1.0'; + $defaultHeaders['xendit-lib-ver'] = '4.2.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -630,7 +630,7 @@ public function getPaymentMethodByIDRequest($payment_method_id, $for_user_id = n // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.1.0'; + $defaultHeaders['xendit-lib-ver'] = '4.2.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1069,7 +1069,7 @@ public function getPaymentsByPaymentMethodIdRequest($payment_method_id, $for_use // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.1.0'; + $defaultHeaders['xendit-lib-ver'] = '4.2.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1341,7 +1341,7 @@ public function patchPaymentMethodRequest($payment_method_id, $for_user_id = nul // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.1.0'; + $defaultHeaders['xendit-lib-ver'] = '4.2.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1718,7 +1718,7 @@ public function getAllPaymentMethodsRequest($for_user_id = null, $id = null, $ty // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.1.0'; + $defaultHeaders['xendit-lib-ver'] = '4.2.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1990,7 +1990,7 @@ public function expirePaymentMethodRequest($payment_method_id, $for_user_id = nu // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.1.0'; + $defaultHeaders['xendit-lib-ver'] = '4.2.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -2262,7 +2262,7 @@ public function authPaymentMethodRequest($payment_method_id, $for_user_id = null // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.1.0'; + $defaultHeaders['xendit-lib-ver'] = '4.2.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -2497,7 +2497,7 @@ public function simulatePaymentRequest($payment_method_id, $simulate_payment_req // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.1.0'; + $defaultHeaders['xendit-lib-ver'] = '4.2.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); diff --git a/lib/PaymentRequest/PaymentRequestApi.php b/lib/PaymentRequest/PaymentRequestApi.php index 583bacb..dae05f0 100644 --- a/lib/PaymentRequest/PaymentRequestApi.php +++ b/lib/PaymentRequest/PaymentRequestApi.php @@ -378,7 +378,7 @@ public function createPaymentRequestRequest($idempotency_key = null, $for_user_i // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.1.0'; + $defaultHeaders['xendit-lib-ver'] = '4.2.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -637,7 +637,7 @@ public function getPaymentRequestByIDRequest($payment_request_id, $for_user_id = // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.1.0'; + $defaultHeaders['xendit-lib-ver'] = '4.2.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -911,7 +911,7 @@ public function getPaymentRequestCapturesRequest($payment_request_id, $for_user_ // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.1.0'; + $defaultHeaders['xendit-lib-ver'] = '4.2.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1240,7 +1240,7 @@ public function getAllPaymentRequestsRequest($for_user_id = null, $reference_id // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.1.0'; + $defaultHeaders['xendit-lib-ver'] = '4.2.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1512,7 +1512,7 @@ public function capturePaymentRequestRequest($payment_request_id, $for_user_id = // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.1.0'; + $defaultHeaders['xendit-lib-ver'] = '4.2.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1784,7 +1784,7 @@ public function authorizePaymentRequestRequest($payment_request_id, $for_user_id // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.1.0'; + $defaultHeaders['xendit-lib-ver'] = '4.2.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -2043,7 +2043,7 @@ public function resendPaymentRequestAuthRequest($payment_request_id, $for_user_i // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.1.0'; + $defaultHeaders['xendit-lib-ver'] = '4.2.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); diff --git a/lib/Payout/PayoutApi.php b/lib/Payout/PayoutApi.php index 188d668..d4890f0 100644 --- a/lib/Payout/PayoutApi.php +++ b/lib/Payout/PayoutApi.php @@ -378,7 +378,7 @@ public function createPayoutRequest($idempotency_key, $for_user_id = null, $crea // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.1.0'; + $defaultHeaders['xendit-lib-ver'] = '4.2.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -637,7 +637,7 @@ public function getPayoutByIdRequest($id, $for_user_id = null, string $contentTy // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.1.0'; + $defaultHeaders['xendit-lib-ver'] = '4.2.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -921,7 +921,7 @@ public function getPayoutChannelsRequest($currency = null, $channel_category = n // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.1.0'; + $defaultHeaders['xendit-lib-ver'] = '4.2.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1226,7 +1226,7 @@ public function getPayoutsRequest($reference_id, $limit = null, $after_id = null // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.1.0'; + $defaultHeaders['xendit-lib-ver'] = '4.2.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1485,7 +1485,7 @@ public function cancelPayoutRequest($id, $for_user_id = null, string $contentTyp // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.1.0'; + $defaultHeaders['xendit-lib-ver'] = '4.2.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); diff --git a/lib/Refund/RefundApi.php b/lib/Refund/RefundApi.php index 73002e8..cc0aaff 100644 --- a/lib/Refund/RefundApi.php +++ b/lib/Refund/RefundApi.php @@ -361,7 +361,7 @@ public function createRefundRequest($idempotency_key = null, $for_user_id = null // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.1.0'; + $defaultHeaders['xendit-lib-ver'] = '4.2.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -622,7 +622,7 @@ public function getRefundRequest($refund_id, $idempotency_key = null, $for_user_ // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.1.0'; + $defaultHeaders['xendit-lib-ver'] = '4.2.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -958,7 +958,7 @@ public function getAllRefundsRequest($for_user_id = null, $payment_request_id = // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.1.0'; + $defaultHeaders['xendit-lib-ver'] = '4.2.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1219,7 +1219,7 @@ public function cancelRefundRequest($refund_id, $idempotency_key = null, $for_us // Xendit's custom headers $defaultHeaders['xendit-lib'] = 'php'; - $defaultHeaders['xendit-lib-ver'] = '4.1.0'; + $defaultHeaders['xendit-lib-ver'] = '4.2.0'; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); diff --git a/lib/Refund/RefundCallbackData.php b/lib/Refund/RefundCallbackData.php index e0bd728..f3c0de8 100644 --- a/lib/Refund/RefundCallbackData.php +++ b/lib/Refund/RefundCallbackData.php @@ -51,7 +51,7 @@ class RefundCallbackData implements ModelInterface, ArrayAccess, \JsonSerializab */ protected static $openAPITypes = [ 'id' => 'string', - 'payment_request_id' => 'string', + 'payment_id' => 'string', 'invoice_id' => 'string', 'payment_method_type' => 'string', 'amount' => 'float', @@ -77,7 +77,7 @@ class RefundCallbackData implements ModelInterface, ArrayAccess, \JsonSerializab */ protected static $openAPIFormats = [ 'id' => null, - 'payment_request_id' => null, + 'payment_id' => null, 'invoice_id' => null, 'payment_method_type' => null, 'amount' => 'double', @@ -101,7 +101,7 @@ class RefundCallbackData implements ModelInterface, ArrayAccess, \JsonSerializab */ protected static array $openAPINullables = [ 'id' => false, - 'payment_request_id' => false, + 'payment_id' => false, 'invoice_id' => true, 'payment_method_type' => false, 'amount' => false, @@ -205,7 +205,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'id' => 'id', - 'payment_request_id' => 'payment_request_id', + 'payment_id' => 'payment_id', 'invoice_id' => 'invoice_id', 'payment_method_type' => 'payment_method_type', 'amount' => 'amount', @@ -229,7 +229,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'id' => 'setId', - 'payment_request_id' => 'setPaymentRequestId', + 'payment_id' => 'setPaymentId', 'invoice_id' => 'setInvoiceId', 'payment_method_type' => 'setPaymentMethodType', 'amount' => 'setAmount', @@ -253,7 +253,7 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'id' => 'getId', - 'payment_request_id' => 'getPaymentRequestId', + 'payment_id' => 'getPaymentId', 'invoice_id' => 'getInvoiceId', 'payment_method_type' => 'getPaymentMethodType', 'amount' => 'getAmount', @@ -328,7 +328,7 @@ public function getModelName() public function __construct(array $data = null) { $this->setIfExists('id', $data ?? [], null); - $this->setIfExists('payment_request_id', $data ?? [], null); + $this->setIfExists('payment_id', $data ?? [], null); $this->setIfExists('invoice_id', $data ?? [], null); $this->setIfExists('payment_method_type', $data ?? [], null); $this->setIfExists('amount', $data ?? [], null); @@ -375,8 +375,8 @@ public function listInvalidProperties() if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } - if ($this->container['payment_request_id'] === null) { - $invalidProperties[] = "'payment_request_id' can't be null"; + if ($this->container['payment_id'] === null) { + $invalidProperties[] = "'payment_id' can't be null"; } if ($this->container['payment_method_type'] === null) { $invalidProperties[] = "'payment_method_type' can't be null"; @@ -448,28 +448,28 @@ public function setId($id) } /** - * Gets payment_request_id + * Gets payment_id * * @return string */ - public function getPaymentRequestId() + public function getPaymentId() { - return $this->container['payment_request_id']; + return $this->container['payment_id']; } /** - * Sets payment_request_id + * Sets payment_id * - * @param string $payment_request_id payment_request_id + * @param string $payment_id payment_id * * @return self */ - public function setPaymentRequestId($payment_request_id) + public function setPaymentId($payment_id) { - if (is_null($payment_request_id)) { - throw new \InvalidArgumentException('non-nullable payment_request_id cannot be null'); + if (is_null($payment_id)) { + throw new \InvalidArgumentException('non-nullable payment_id cannot be null'); } - $this->container['payment_request_id'] = $payment_request_id; + $this->container['payment_id'] = $payment_id; return $this; }