diff --git a/payment/paypal/src/Paypal.php b/payment/paypal/src/Paypal.php index 78aafb9..1eb40fd 100644 --- a/payment/paypal/src/Paypal.php +++ b/payment/paypal/src/Paypal.php @@ -60,11 +60,8 @@ public function buildInitialOrder(Cart $cart): array $billingAddress = $cart->billingAddress; $shippingAddress = $cart->shippingAddress ?: $billingAddress; -<<<<<<< HEAD -======= $successRoute = config('lunar.payments.paypal.success_route', 'checkout.success'); ->>>>>>> feat/stripe-refactor $requestData = [ 'intent' => 'CAPTURE', 'purchase_units' => [ @@ -92,22 +89,13 @@ public function buildInitialOrder(Cart $cart): array 'shipping_preference' => 'SET_PROVIDED_ADDRESS', 'payment_method_preference' => 'IMMEDIATE_PAYMENT_REQUIRED', 'email' => $billingAddress?->contact_email, -<<<<<<< HEAD - 'return_url' => route('checkout.success'), - 'cancel_url' => route('checkout.index', $cart->fingerprint()), -======= 'return_url' => route($successRoute), 'cancel_url' => route($successRoute, $cart->fingerprint()), ->>>>>>> feat/stripe-refactor 'name' => [ 'given_name' => $billingAddress?->first_name, 'surname' => $billingAddress?->last_name, ], -<<<<<<< HEAD - 'email_address' => $billingAddress->email, -======= 'email_address' => $billingAddress->contact_email, ->>>>>>> feat/stripe-refactor 'address' => [ 'address_line_1' => $billingAddress?->line_one, 'address_line_2' => $billingAddress?->line_two, @@ -121,11 +109,7 @@ public function buildInitialOrder(Cart $cart): array ]; return $this->baseHttpClient()->withToken($this->getAccessToken())->withBody( -<<<<<<< HEAD - json_encode($requestData) -======= json_encode($requestData), 'application/json' ->>>>>>> feat/stripe-refactor )->post('v2/checkout/orders')->json(); } } \ No newline at end of file diff --git a/payment/paypal/src/PaypalPaymentType.php b/payment/paypal/src/PaypalPaymentType.php index b7a8a88..dcb8691 100644 --- a/payment/paypal/src/PaypalPaymentType.php +++ b/payment/paypal/src/PaypalPaymentType.php @@ -55,7 +55,7 @@ public function authorize(): PaymentAuthorize if (isset($paypalOrder['name']) && $paypalOrder['name'] == 'RESOURCE_NOT_FOUND') { return new PaymentAuthorize( - successful: false, + success: false, ); }