mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-05 18:52:44 +01:00
Working on payment flow - client side
This commit is contained in:
parent
90530de46d
commit
9431abb300
@ -127,7 +127,6 @@ class InvoiceController extends Controller
|
||||
})->map(function ($invoice){
|
||||
$invoice->balance = Number::formatMoney($invoice->balance, $invoice->client);
|
||||
$invoice->due_date = $this->formatDate($invoice->due_date, $invoice->client->date_format());
|
||||
|
||||
return $invoice;
|
||||
});
|
||||
|
||||
|
@ -75,6 +75,38 @@ class PaymentController extends Controller
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Presents the payment screen for a given
|
||||
* gateway and payment method.
|
||||
* The request will also contain the amount
|
||||
* and invoice ids for reference
|
||||
* @param int $company_gateway_id The CompanyGateway ID
|
||||
* @param int $payment_method_id The PaymentMethod ID
|
||||
* @return void
|
||||
*/
|
||||
public function process($company_gateway_id, $payment_method_id)
|
||||
{
|
||||
|
||||
$invoices = request()->input('ids');
|
||||
$amount = request()->input('amount');
|
||||
|
||||
//build a cache record to maintain state
|
||||
|
||||
//boot the payment gateway
|
||||
|
||||
//build the gateway specific views
|
||||
|
||||
|
||||
$data = [
|
||||
'redirect_url' =>,
|
||||
'amount' =>,
|
||||
'gateway_data' =>,
|
||||
'cache_hash' =>,
|
||||
];
|
||||
|
||||
return view('', $data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -264,7 +264,7 @@ class Client extends BaseModel
|
||||
|
||||
$payment_urls[] = [
|
||||
'label' => ctrans('texts.' . $gateway->type->alias) . $fee_label,
|
||||
'url' => URL::signedRoute('payments', [
|
||||
'url' => URL::signedRoute('payments.process', [
|
||||
'company_gateway_id' => $key,
|
||||
'payment_method_id' => $value])
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user