diff --git a/src/Message/AuthorizeRequest.php b/src/Message/AuthorizeRequest.php index 703a1b56..d41c242d 100644 --- a/src/Message/AuthorizeRequest.php +++ b/src/Message/AuthorizeRequest.php @@ -211,6 +211,18 @@ public function setStatementDescriptor($value) return $this->setParameter('statementDescriptor', $value); } + public function getStatementDescriptorSuffix() + { + return $this->getParameter('statementDescriptorSuffix'); + } + + public function setStatementDescriptorSuffix($value) + { + $value = str_replace(array('<', '>', '"', '\''), '', $value); + + return $this->setParameter('statementDescriptorSuffix', $value); + } + /** * @return mixed */ @@ -307,6 +319,11 @@ public function getData() if ($this->getStatementDescriptor()) { $data['statement_descriptor'] = $this->getStatementDescriptor(); } + + if ($this->getStatementDescriptorSuffix()) { + $data['statement_descriptor_suffix'] = $this->getStatementDescriptorSuffix(); + } + if ($this->getDestination()) { $data['destination'] = $this->getDestination(); } diff --git a/src/Message/PaymentIntents/AuthorizeRequest.php b/src/Message/PaymentIntents/AuthorizeRequest.php index 5154042f..a2aa0bca 100644 --- a/src/Message/PaymentIntents/AuthorizeRequest.php +++ b/src/Message/PaymentIntents/AuthorizeRequest.php @@ -268,6 +268,26 @@ public function setStatementDescriptor($value) return $this->setParameter('statementDescriptor', $value); } + /** + * @return mixed + */ + public function getStatementDescriptorSuffix() + { + return $this->getParameter('statementDescriptorSuffix'); + } + + /** + * @param string $value + * + * @return AbstractRequest provides a fluent interface. + */ + public function setStatementDescriptorSuffix($value) + { + $value = str_replace(array('<', '>', '"', '\''), '', $value); + + return $this->setParameter('statementDescriptorSuffix', $value); + } + /** * @return mixed */ @@ -382,6 +402,11 @@ public function getData() if ($this->getStatementDescriptor()) { $data['statement_descriptor'] = $this->getStatementDescriptor(); } + + if ($this->getStatementDescriptorSuffix()) { + $data['statement_descriptor_suffix'] = $this->getStatementDescriptorSuffix(); + } + if ($this->getDestination()) { $data['transfer_data']['destination'] = $this->getDestination(); }