Authorize.net: Update amount with fee

This commit is contained in:
Benjamin Beganović 2020-12-21 12:10:28 +01:00
parent 5a8dfd85eb
commit 24d76e98f0

View File

@ -75,7 +75,7 @@ class AuthorizeCreditCard
$client_gateway_token = $authorise_payment_method->createClientGatewayToken($payment_profile, $gateway_customer_reference); $client_gateway_token = $authorise_payment_method->createClientGatewayToken($payment_profile, $gateway_customer_reference);
} }
$data = (new ChargePaymentProfile($this->authorize))->chargeCustomerProfile($gateway_customer_reference, $payment_profile_id, $data['amount_with_fee']); $data = (new ChargePaymentProfile($this->authorize))->chargeCustomerProfile($gateway_customer_reference, $payment_profile_id, $data['total']['amount_with_fee']);
return $this->handleResponse($data, $request); return $this->handleResponse($data, $request);
} }
@ -106,13 +106,13 @@ class AuthorizeCreditCard
// $payment_record['transaction_reference'] = $response->getTransactionResponse()->getTransId(); // $payment_record['transaction_reference'] = $response->getTransactionResponse()->getTransId();
// $this->authorize->createPayment($payment_record); // $this->authorize->createPayment($payment_record);
$this->storePayment($payment_hash, $data); $this->storePayment($payment_hash, $data);
// $payment = $this->createPaymentRecord($data, $amount); // $payment = $this->createPaymentRecord($data, $amount);
// $payment->meta = $cgt->meta; // $payment->meta = $cgt->meta;
// $payment->save(); // $payment->save();
// $payment_hash->payment_id = $payment->id; // $payment_hash->payment_id = $payment->id;
// $payment_hash->save(); // $payment_hash->save();