1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Minor fixes for PayPal

This commit is contained in:
David Bomba 2020-09-07 13:14:43 +10:00
parent f98319a1c1
commit d909b4939c
2 changed files with 9 additions and 1 deletions

View File

@ -111,7 +111,7 @@ class CreateInvoicePdf implements ShouldQueue
//todo - move this to the client creation stage so we don't keep hitting this unnecessarily
Storage::makeDirectory($path, 0775);
info($maker->getCompiledHTML(true));
//info($maker->getCompiledHTML(true));
$pdf = $this->makePdf(null, null, $maker->getCompiledHTML(true));

View File

@ -262,6 +262,13 @@ class PayPalExpressPaymentDriver extends BasePaymentDriver
public function createPayment($data, $status = Payment::STATUS_COMPLETED): Payment
{
$payment_meta = new \stdClass;
$payment_meta->exp_month = 'xx';
$payment_meta->exp_year = 'xx';
$payment_meta->brand = 'PayPal';
$payment_meta->last4 = 'xxxx';
$payment_meta->type = GatewayType::PAYPAL;
$payment = parent::createPayment($data, $status);
$client_contact = $this->getContact();
@ -271,6 +278,7 @@ class PayPalExpressPaymentDriver extends BasePaymentDriver
$payment->type_id = PaymentType::PAYPAL;
$payment->transaction_reference = $data['PAYMENTINFO_0_TRANSACTIONID'];
$payment->client_contact_id = $client_contact_id;
$payment->meta = $payment_meta;
$payment->save();
return $payment;