Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added statement_descriptor_suffix paramater #229

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
added statement_descriptor_suffix paramater
chargePanelAndreas committed Jan 10, 2024
commit 74474f1425d128b19d998e6b0fce9b223ae18ea1
17 changes: 17 additions & 0 deletions src/Message/AuthorizeRequest.php
Original file line number Diff line number Diff line change
@@ -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();
}
25 changes: 25 additions & 0 deletions src/Message/PaymentIntents/AuthorizeRequest.php
Original file line number Diff line number Diff line change
@@ -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();
}