mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 15:34:39 -04:00
Fixes for paypal
This commit is contained in:
parent
a74e6434a9
commit
f51509b31b
@ -412,7 +412,12 @@ class PayPalPPCPPaymentDriver extends BaseDriver
|
|||||||
],
|
],
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
if($shipping = $this->getShippingAddress()){
|
||||||
|
$order['purchase_units'][0] = $shipping;
|
||||||
|
}
|
||||||
|
|
||||||
$r = $this->gatewayRequest('/v2/checkout/orders', 'post', $order);
|
$r = $this->gatewayRequest('/v2/checkout/orders', 'post', $order);
|
||||||
|
|
||||||
nlog($r->json());
|
nlog($r->json());
|
||||||
@ -434,7 +439,7 @@ class PayPalPPCPPaymentDriver extends BaseDriver
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getShippingAddress(): array
|
private function getShippingAddress(): ?array
|
||||||
{
|
{
|
||||||
return $this->company_gateway->require_shipping_address ?
|
return $this->company_gateway->require_shipping_address ?
|
||||||
[
|
[
|
||||||
@ -450,7 +455,7 @@ class PayPalPPCPPaymentDriver extends BaseDriver
|
|||||||
],
|
],
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
: [];
|
: null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
@push('footer')
|
@push('footer')
|
||||||
|
|
||||||
<script src="https://www.paypal.com/sdk/js?client-id={!! $client_id !!}&merchant-id={!! $merchantId !!}&components=buttons,funding-eligibility&intent=capture" data-client-token="{!! $token !!}" data-partner-attribution-id="invoiceninja_SP_PPCP"></script>
|
<script src="https://www.paypal.com/sdk/js?client-id={!! $client_id !!}&merchant-id={!! $merchantId !!}&components=buttons,funding-eligibility&intent=capture" data-partner-attribution-id="invoiceninja_SP_PPCP"></script>
|
||||||
<div id="paypal-button-container"></div>
|
<div id="paypal-button-container"></div>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user