|
|
@@ -78,7 +78,7 @@ class AwxAfterpay extends Payment
|
|
|
'request_id' => $this->createUuid(),
|
|
|
'amount' => $grandTotal,
|
|
|
'descriptor' => $this->prefix,
|
|
|
- 'return_url' => $this->getBaseUlr() . '/klarna/standard/return?orderId=' . $override['merchantOrderId'],
|
|
|
+ 'return_url' => $this->getBaseUlr() . '/afterpay/standard/return?orderId=' . $override['merchantOrderId'],
|
|
|
'merchant_order_id' => $this->prefix . $override['merchantOrderId'],
|
|
|
'currency' => $order->order_currency_code,
|
|
|
'customer' => [
|
|
|
@@ -289,6 +289,9 @@ class AwxAfterpay extends Payment
|
|
|
return false;
|
|
|
}
|
|
|
$cart = Cart::getCart();
|
|
|
+ if (! $cart || ! $cart->billing_address) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
$billingCountry = $cart->billing_address->country;
|
|
|
$allowedCountries = ['AU', 'CA', 'NZ', 'GB', 'US'];
|
|
|
return in_array($billingCountry, $allowedCountries);
|