diff --git a/README.md b/README.md index c986fde..f3b1702 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ The package's installation is done using composer. Simply add these lines to you ```json { "require": { - "processout/processout-php": "^6.22.0" + "processout/processout-php": "^6.23.0" } } ``` diff --git a/src/Invoice.php b/src/Invoice.php index ab5933c..85faa20 100755 --- a/src/Invoice.php +++ b/src/Invoice.php @@ -256,6 +256,18 @@ class Invoice implements \JsonSerializable */ protected $paymentType; + /** + * Initiation type of invoice + * @var string + */ + protected $initiationType; + + /** + * Payment intent of invoice + * @var string + */ + protected $paymentIntent; + /** * Invoice constructor * @param ProcessOut\ProcessOut $client @@ -1231,6 +1243,50 @@ public function setPaymentType($value) return $this; } + /** + * Get InitiationType + * Initiation type of invoice + * @return string + */ + public function getInitiationType() + { + return $this->initiationType; + } + + /** + * Set InitiationType + * Initiation type of invoice + * @param string $value + * @return $this + */ + public function setInitiationType($value) + { + $this->initiationType = $value; + return $this; + } + + /** + * Get PaymentIntent + * Payment intent of invoice + * @return string + */ + public function getPaymentIntent() + { + return $this->paymentIntent; + } + + /** + * Set PaymentIntent + * Payment intent of invoice + * @param string $value + * @return $this + */ + public function setPaymentIntent($value) + { + $this->paymentIntent = $value; + return $this; + } + /** * Fills the current object with the new values pulled from the data @@ -1359,6 +1415,12 @@ public function fillWithData($data) if(! empty($data['payment_type'])) $this->setPaymentType($data['payment_type']); + if(! empty($data['initiation_type'])) + $this->setInitiationType($data['initiation_type']); + + if(! empty($data['payment_intent'])) + $this->setPaymentIntent($data['payment_intent']); + return $this; } @@ -1408,6 +1470,8 @@ public function jsonSerialize() { "incremental" => $this->getIncremental(), "tax" => $this->getTax(), "payment_type" => $this->getPaymentType(), + "initiation_type" => $this->getInitiationType(), + "payment_intent" => $this->getPaymentIntent(), ); } @@ -1734,6 +1798,8 @@ public function create($options = array()) "challenge_indicator" => $this->getChallengeIndicator(), "gateway_data" => $this->getGatewayData(), "merchant_initiator_type" => $this->getMerchantInitiatorType(), + "initiation_type" => $this->getInitiationType(), + "payment_intent" => $this->getPaymentIntent(), "statement_descriptor" => $this->getStatementDescriptor(), "statement_descriptor_phone" => $this->getStatementDescriptorPhone(), "statement_descriptor_city" => $this->getStatementDescriptorCity(), diff --git a/src/Networking/Request.php b/src/Networking/Request.php index 551df07..270d93f 100644 --- a/src/Networking/Request.php +++ b/src/Networking/Request.php @@ -31,7 +31,7 @@ protected function prepare($options, $len = null) $headers = array( 'API-Version: 1.4.0.0', 'Content-Type: application/json', - 'User-Agent: ProcessOut PHP-Bindings/6.22.0' + 'User-Agent: ProcessOut PHP-Bindings/6.23.0' ); if (! empty($options['idempotencyKey'])) $headers[] = 'Idempotency-Key: ' . $options['idempotencyKey'];