1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-12 22:22:32 +01:00
invoiceninja/app/Ninja/PaymentDrivers/PayPalExpressPaymentDriver.php
2016-07-21 14:28:06 +03:00

50 lines
942 B
PHP

<?php
namespace App\Ninja\PaymentDrivers;
use App\Models\Payment;
use App\Models\PaymentMethod;
/**
* Class PayPalExpressPaymentDriver
*/
class PayPalExpressPaymentDriver extends BasePaymentDriver
{
/**
* @return array
*/
public function gatewayTypes()
{
return [
GATEWAY_TYPE_PAYPAL
];
}
/**
* @param PaymentMethod $paymentMethod
*
* @return array
*/
protected function paymentDetails(PaymentMethod $paymentMethod = null)
{
$data = parent::paymentDetails();
$data['ButtonSource'] = 'InvoiceNinja_SP';
return $data;
}
/**
* @param Payment $payment
* @param PaymentMethod $paymentMethod
*
* @return Payment
*/
protected function creatingPayment(Payment $payment, PaymentMethod $paymentMethod)
{
$payment->payer_id = $this->input['PayerID'];
return $payment;
}
}