Implement checkout object for phone

This commit is contained in:
David Bomba 2022-11-29 23:14:01 +11:00
parent bf07742caa
commit 0815a0ff69
2 changed files with 7 additions and 5 deletions

View File

@ -94,8 +94,6 @@ class CreditCard implements MethodInterface
$customerRequest = $this->checkout->getCustomer();
nlog($customerRequest);
$request = $this->bootRequest($gateway_response->token);
$request->capture = false;
$request->reference = '$1 payment for authorization.';

View File

@ -34,6 +34,7 @@ use Checkout\CheckoutArgumentException;
use Checkout\CheckoutAuthorizationException;
use Checkout\CheckoutDefaultSdk;
use Checkout\CheckoutFourSdk;
use Checkout\Common\Phone;
use Checkout\Customers\CustomerRequest;
use Checkout\Customers\Four\CustomerRequest as FourCustomerRequest;
use Checkout\Environment;
@ -300,9 +301,12 @@ class CheckoutComPaymentDriver extends BaseDriver
$request = new CustomerRequest();
}
$phone = new Phone();
$phone->number = $this->client->present()->phone();
$request->email = $this->client->present()->email();
$request->name = $this->client->present()->name();
$request->phone = $this->client->present()->phone();
$request->phone = $phone;
try {
$response = $this->gateway->getCustomersClient()->create($request);