Adjustments for PPCP

This commit is contained in:
David Bomba 2024-01-24 07:31:06 +11:00
parent 728d013b92
commit c1b8d676c2
2 changed files with 4 additions and 5 deletions

View File

@ -63,7 +63,7 @@ class NinjaMailerJob implements ShouldQueue
protected $client_mailgun_domain = false; protected $client_mailgun_domain = false;
public function __construct(public NinjaMailerObject $nmo, public bool $override = false) public function __construct(public ?NinjaMailerObject $nmo, public bool $override = false)
{ {
} }

View File

@ -437,7 +437,7 @@ class PayPalPPCPPaymentDriver extends BaseDriver
if($shipping = $this->getShippingAddress()) { if($shipping = $this->getShippingAddress()) {
$order['purchase_units'][0] = $shipping; $order['purchase_units'][0]["shipping"] = $shipping;
} }
$r = $this->gatewayRequest('/v2/checkout/orders', 'post', $order); $r = $this->gatewayRequest('/v2/checkout/orders', 'post', $order);
@ -465,8 +465,7 @@ class PayPalPPCPPaymentDriver extends BaseDriver
{ {
return $this->company_gateway->require_shipping_address ? return $this->company_gateway->require_shipping_address ?
[ [
"shipping" => [ "address" =>
"address" =>
[ [
"address_line_1" => $this->client->shipping_address1, "address_line_1" => $this->client->shipping_address1,
"address_line_2" => $this->client->shipping_address2, "address_line_2" => $this->client->shipping_address2,
@ -475,8 +474,8 @@ class PayPalPPCPPaymentDriver extends BaseDriver
"postal_code" => $this->client->shipping_postal_code, "postal_code" => $this->client->shipping_postal_code,
"country_code" => $this->client->present()->shipping_country_code(), "country_code" => $this->client->present()->shipping_country_code(),
], ],
]
] ]
: null; : null;
} }