Skip to content

Commit 4f93e22

Browse files
add some params required for saving card for future use
1 parent e76e7ff commit 4f93e22

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

src/Message/Checkout/PurchaseRequest.php

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,28 @@ public function getClientReferenceId()
145145
return $this->getParameter('client_reference_id');
146146
}
147147

148+
/**
149+
* Set the customer_creation parameter
150+
*
151+
* @param string $value
152+
*
153+
* @return \Omnipay\Common\Message\AbstractRequest|PurchaseRequest
154+
*/
155+
public function setCustomerCreation($value)
156+
{
157+
return $this->setParameter('customer_creation', $value);
158+
}
159+
160+
/**
161+
* Get the customer_creation parameter
162+
*
163+
* @return string
164+
*/
165+
public function getCustomerCreation()
166+
{
167+
return $this->getParameter('customer_creation');
168+
}
169+
148170
public function getData()
149171
{
150172
$data = array(
@@ -153,9 +175,7 @@ public function getData()
153175
'cancel_url' => $this->getCancelUrl(),
154176
'payment_method_types' => $this->getPaymentMethodTypes(),
155177
'mode' => $this->getMode(),
156-
'customer_creation' => $this->getParameter('customer_creation'),
157-
'payment_intent_data' => $this->getParameter('payment_intent_data'),
158-
'automatic_payment_methods' => $this->getParameter('automatic_payment_methods'),
178+
'customer_creation' => $this->getCustomerCreation(),
159179
'line_items' => $this->getLineItems()
160180
);
161181

0 commit comments

Comments
 (0)