mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-09-21 00:41:34 +02:00
Updates for PayPal payment Platform
This commit is contained in:
parent
e37c11499c
commit
a74e6434a9
@ -303,11 +303,15 @@ class PayPalPPCPPaymentDriver extends BaseDriver
|
|||||||
|
|
||||||
private function paymentSource(): array
|
private function paymentSource(): array
|
||||||
{
|
{
|
||||||
return match($this->paypal_payment_method) {
|
/** we only need to support paypal as payment source until as we are only using hosted payment buttons */
|
||||||
'paypal' => $this->injectPayPalPaymentSource(),
|
return $this->injectPayPalPaymentSource();
|
||||||
'card' => $this->injectCardPaymentSource(),
|
|
||||||
'venmo' => $this->injectVenmoPaymentSource(),
|
// return match($this->paypal_payment_method) {
|
||||||
};
|
// 'paypal' => $this->injectPayPalPaymentSource(),
|
||||||
|
// 'card' => $this->injectCardPaymentSource(),
|
||||||
|
// 'venmo' => $this->injectVenmoPaymentSource(),
|
||||||
|
// };
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function injectVenmoPaymentSource(): array
|
private function injectVenmoPaymentSource(): array
|
||||||
@ -373,14 +377,6 @@ class PayPalPPCPPaymentDriver extends BaseDriver
|
|||||||
|
|
||||||
"intent" => "CAPTURE",
|
"intent" => "CAPTURE",
|
||||||
"payment_source" => $this->paymentSource(),
|
"payment_source" => $this->paymentSource(),
|
||||||
// "payer" => [
|
|
||||||
// "name" => [
|
|
||||||
// "given_name" => $this->client->present()->first_name(),
|
|
||||||
// "surname" => $this->client->present()->last_name(),
|
|
||||||
// ],
|
|
||||||
// "email_address" => $this->client->present()->email(),
|
|
||||||
// "address" => $this->getBillingAddress(),
|
|
||||||
// ],
|
|
||||||
"purchase_units" => [
|
"purchase_units" => [
|
||||||
[
|
[
|
||||||
"description" =>ctrans('texts.invoice_number').'# '.$invoice->number,
|
"description" =>ctrans('texts.invoice_number').'# '.$invoice->number,
|
||||||
|
Loading…
Reference in New Issue
Block a user