-
Notifications
You must be signed in to change notification settings - Fork 1
Fastcheckout
woutse edited this page Nov 18, 2024
·
1 revision
In order to enable fast checkout, just call the enableFastCheckout() method on your orderCreateRequest object, like this:
<?php
$request = new orderCreateRequest();
$request->enableFastCheckout();
When the fast checkout payment has been successfully completed, your exchange handler will receive an exchange request, containing the necessary customer data for you, to update or create your order.
First check if your exchange request is a fast checkout request and then retrieve the customer-data, like this:
<?php
$exchange = new Exchange()
try
{
# Process the exchange request
$payOrder = $exchange->process();
if($payOrder->isPaid() && $payOrder->isFastCheckout()) {
$customerData = $payOrder->getFastCheckoutData()
# Update or create your order here, using $customerData.
}
} catch (Throwable $exception) {
# Your exception handling
}