diff --git a/app/PaymentDrivers/CheckoutCom/CreditCard.php b/app/PaymentDrivers/CheckoutCom/CreditCard.php index 89cebc3da19d..04fe776dc5c1 100644 --- a/app/PaymentDrivers/CheckoutCom/CreditCard.php +++ b/app/PaymentDrivers/CheckoutCom/CreditCard.php @@ -170,6 +170,7 @@ class CreditCard implements MethodInterface private function completePayment($method, PaymentResponseRequest $request) { + $payment = new Payment($method, $this->checkout->payment_hash->data->currency); $payment->amount = $this->checkout->payment_hash->data->value; $payment->reference = $this->checkout->getDescription(); @@ -178,6 +179,10 @@ class CreditCard implements MethodInterface 'email' => $this->checkout->client->present()->email(), ]; + $payment->metadata = [ + 'udf1' => "Invoice Ninja", + ]; + $this->checkout->payment_hash->data = array_merge((array)$this->checkout->payment_hash->data, ['checkout_payment_ref' => $payment]); $this->checkout->payment_hash->save();