mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Fix for checkouit.com integration
This commit is contained in:
parent
4912c40650
commit
ed48fb1a3f
@ -101,7 +101,9 @@ class PublicClientController extends BaseController
|
||||
// Checkout.com requires first getting a payment token
|
||||
$checkoutComToken = false;
|
||||
$checkoutComKey = false;
|
||||
$checkoutComDebug = false;
|
||||
if ($accountGateway = $account->getGatewayConfig(GATEWAY_CHECKOUT_COM)) {
|
||||
$checkoutComDebug = $accountGateway->getConfigField('testMode');
|
||||
if ($checkoutComToken = $this->paymentService->getCheckoutComToken($invitation)) {
|
||||
$checkoutComKey = $accountGateway->getConfigField('publicApiKey');
|
||||
$invitation->transaction_reference = $checkoutComToken;
|
||||
@ -126,6 +128,7 @@ class PublicClientController extends BaseController
|
||||
'paymentURL' => $paymentURL,
|
||||
'checkoutComToken' => $checkoutComToken,
|
||||
'checkoutComKey' => $checkoutComKey,
|
||||
'checkoutComDebug' => $checkoutComDebug,
|
||||
'phantomjs' => Input::has('phantomjs'),
|
||||
);
|
||||
|
||||
|
@ -41,7 +41,7 @@ class AccountGatewayService extends BaseService
|
||||
[
|
||||
'name',
|
||||
function ($model) {
|
||||
return link_to("gateways/{$model->public_id}/edit", $model->name);
|
||||
return link_to("gateways/{$model->public_id}/edit", $model->name)->toHtml();
|
||||
}
|
||||
],
|
||||
[
|
||||
|
@ -3,7 +3,7 @@
|
||||
<form method="POST" class="payment-form">
|
||||
<script>
|
||||
Checkout.render({
|
||||
debugMode: true,
|
||||
debugMode: {{ $checkoutComDebug }},
|
||||
publicKey: '{{ $checkoutComKey }}',
|
||||
paymentToken: '{{ $checkoutComToken }}',
|
||||
customerEmail: '{{ $contact->email }}',
|
||||
|
Loading…
Reference in New Issue
Block a user