invoiceninja/app/Ninja/PaymentDrivers/PayPalExpressPaymentDriver.php

31 lines
643 B
PHP
Raw Normal View History

2017-01-30 21:40:43 +02:00
<?php
namespace App\Ninja\PaymentDrivers;
2016-06-20 17:14:43 +03:00
class PayPalExpressPaymentDriver extends BasePaymentDriver
{
2016-06-22 21:42:09 +03:00
public function gatewayTypes()
2016-06-20 17:14:43 +03:00
{
return [
2017-01-30 21:40:43 +02:00
GATEWAY_TYPE_PAYPAL,
2016-06-20 17:14:43 +03:00
];
}
2016-07-21 15:35:23 +03:00
protected function paymentDetails($paymentMethod = false)
2016-06-20 17:14:43 +03:00
{
$data = parent::paymentDetails();
$data['ButtonSource'] = 'InvoiceNinja_SP';
$data['solutionType'] = 'Sole'; // show 'Pay with credit card' option
2016-06-20 17:14:43 +03:00
return $data;
}
2016-07-21 15:35:23 +03:00
protected function creatingPayment($payment, $paymentMethod)
2016-06-20 17:14:43 +03:00
{
$payment->payer_id = $this->input['PayerID'];
return $payment;
}
}