Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The package's installation is done using composer. Simply add these lines to you
```json
{
"require": {
"processout/processout-php": "^6.32.0"
"processout/processout-php": "^6.33.0"
}
}
```
Expand Down
35 changes: 34 additions & 1 deletion src/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,12 @@ class Invoice implements \JsonSerializable
*/
protected $verification;

/**
* A timestamp to indicate when an auto capture should take place following an authorization. This takes priority over the value sent in the authorization request.
* @var string
*/
protected $autoCaptureAt;

/**
* Invoice constructor
* @param ProcessOut\ProcessOut $client
Expand Down Expand Up @@ -1448,6 +1454,28 @@ public function setVerification($value)
return $this;
}

/**
* Get AutoCaptureAt
* A timestamp to indicate when an auto capture should take place following an authorization. This takes priority over the value sent in the authorization request.
* @return string
*/
public function getAutoCaptureAt()
{
return $this->autoCaptureAt;
}

/**
* Set AutoCaptureAt
* A timestamp to indicate when an auto capture should take place following an authorization. This takes priority over the value sent in the authorization request.
* @param string $value
* @return $this
*/
public function setAutoCaptureAt($value)
{
$this->autoCaptureAt = $value;
return $this;
}


/**
* Fills the current object with the new values pulled from the data
Expand Down Expand Up @@ -1597,6 +1625,9 @@ public function fillWithData($data)
if(! empty($data['verification']))
$this->setVerification($data['verification']);

if(! empty($data['auto_capture_at']))
$this->setAutoCaptureAt($data['auto_capture_at']);

return $this;
}

Expand Down Expand Up @@ -1653,6 +1684,7 @@ public function jsonSerialize() {
"billing" => $this->getBilling(),
"unsupported_feature_bypass" => $this->getUnsupportedFeatureBypass(),
"verification" => $this->getVerification(),
"auto_capture_at" => $this->getAutoCaptureAt(),
);
}

Expand Down Expand Up @@ -2101,7 +2133,8 @@ public function create($options = array())
"payment_type" => $this->getPaymentType(),
"billing" => $this->getBilling(),
"unsupported_feature_bypass" => $this->getUnsupportedFeatureBypass(),
"verification" => $this->getVerification()
"verification" => $this->getVerification(),
"auto_capture_at" => $this->getAutoCaptureAt()
);

$response = $request->post($path, $data, $options);
Expand Down
2 changes: 1 addition & 1 deletion src/Networking/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.32.0'
'User-Agent: ProcessOut PHP-Bindings/6.33.0'
);
if (! empty($options['idempotencyKey']))
$headers[] = 'Idempotency-Key: ' . $options['idempotencyKey'];
Expand Down