mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-01 10:04:34 -04:00
Working on payment records from online payments
This commit is contained in:
parent
4a14206e84
commit
c5d093232c
@ -160,7 +160,7 @@ class Charge
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
$payment_method_type = $response->charges->data[0]->payment_method_details->card->brand;
|
$payment_method_type = $response->charges->data[0]->payment_method_details->card->brand;
|
||||||
info($payment_method_type);
|
//info($payment_method_type);
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'gateway_type_id' => $cgt->gateway_type_id,
|
'gateway_type_id' => $cgt->gateway_type_id,
|
||||||
|
@ -71,8 +71,6 @@ class PaymentRepository extends BaseRepository
|
|||||||
private function applyPayment(array $data, Payment $payment): ?Payment
|
private function applyPayment(array $data, Payment $payment): ?Payment
|
||||||
{
|
{
|
||||||
|
|
||||||
info(print_r($data,1));
|
|
||||||
|
|
||||||
//check currencies here and fill the exchange rate data if necessary
|
//check currencies here and fill the exchange rate data if necessary
|
||||||
if (!$payment->id) {
|
if (!$payment->id) {
|
||||||
$this->processExchangeRates($data, $payment);
|
$this->processExchangeRates($data, $payment);
|
||||||
@ -149,10 +147,10 @@ info(print_r($data,1));
|
|||||||
|
|
||||||
event(new PaymentWasCreated($payment, $payment->company, Ninja::eventVars()));
|
event(new PaymentWasCreated($payment, $payment->company, Ninja::eventVars()));
|
||||||
|
|
||||||
/*info("invoice totals = {$invoice_totals}");
|
/*info("invoice totals = {$invoice_totals}");
|
||||||
info("credit totals = {$credit_totals}");
|
info("credit totals = {$credit_totals}");
|
||||||
info("applied totals = " . array_sum(array_column($data['invoices'], 'amount')));
|
info("applied totals = " . array_sum(array_column($data['invoices'], 'amount')));
|
||||||
*/
|
*/
|
||||||
//$invoice_totals -= $credit_totals;
|
//$invoice_totals -= $credit_totals;
|
||||||
|
|
||||||
////$payment->amount = $invoice_totals; //creates problems when setting amount like this.
|
////$payment->amount = $invoice_totals; //creates problems when setting amount like this.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user