Skip to content

Commit

Permalink
Merge pull request #60 from alfie-loakes-cko/apm-customer-data
Browse files Browse the repository at this point in the history
Add customer data to Sepa request.
  • Loading branch information
nicolas-maalouf-cko authored Oct 12, 2020
2 parents 980b109 + 8a858c7 commit 298dd70
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "checkout/checkout-sdk-php",
"description": "Checkout.com SDK for PHP",
"homepage": "https://github.com/checkout/checkout-sdk-php",
"version": "1.0.12",
"version": "1.0.13",
"type": "library",
"license": "MIT",
"keywords": ["checkout.com","payment","gateway","checkout","checkoutcom","GW3","CKO", "Reboot", "SDK", "Library", "PHP", "API"],
Expand Down
2 changes: 1 addition & 1 deletion src/CheckoutApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ final class CheckoutApi
*
* @var string
*/
const VERSION = '1.0.12';
const VERSION = '1.0.13';

/**
* Channel section.
Expand Down
7 changes: 6 additions & 1 deletion src/Models/Sources/Sepa.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

use Checkout\Library\Model;
use Checkout\Models\Address;
use Checkout\Models\Payments\Customer;

/**
* Model for sources.
Expand Down Expand Up @@ -56,12 +57,16 @@ class Sepa extends Source
*
* @param BillingAddress $address
* @param SepaData $data
* @param Customer|null $customer
*/
public function __construct(Address $address, SepaData $data)
public function __construct(Address $address, SepaData $data, Customer $customer = null)
{
$this->type = static::MODEL_NAME;
$this->billing_address = $address;
$this->source_data = $data;
if ($customer) {
$this->customer = $customer;
}
}

/**
Expand Down

0 comments on commit 298dd70

Please sign in to comment.