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
|
// Checkout.com requires first getting a payment token
|
||||||
$checkoutComToken = false;
|
$checkoutComToken = false;
|
||||||
$checkoutComKey = false;
|
$checkoutComKey = false;
|
||||||
|
$checkoutComDebug = false;
|
||||||
if ($accountGateway = $account->getGatewayConfig(GATEWAY_CHECKOUT_COM)) {
|
if ($accountGateway = $account->getGatewayConfig(GATEWAY_CHECKOUT_COM)) {
|
||||||
|
$checkoutComDebug = $accountGateway->getConfigField('testMode');
|
||||||
if ($checkoutComToken = $this->paymentService->getCheckoutComToken($invitation)) {
|
if ($checkoutComToken = $this->paymentService->getCheckoutComToken($invitation)) {
|
||||||
$checkoutComKey = $accountGateway->getConfigField('publicApiKey');
|
$checkoutComKey = $accountGateway->getConfigField('publicApiKey');
|
||||||
$invitation->transaction_reference = $checkoutComToken;
|
$invitation->transaction_reference = $checkoutComToken;
|
||||||
@ -126,6 +128,7 @@ class PublicClientController extends BaseController
|
|||||||
'paymentURL' => $paymentURL,
|
'paymentURL' => $paymentURL,
|
||||||
'checkoutComToken' => $checkoutComToken,
|
'checkoutComToken' => $checkoutComToken,
|
||||||
'checkoutComKey' => $checkoutComKey,
|
'checkoutComKey' => $checkoutComKey,
|
||||||
|
'checkoutComDebug' => $checkoutComDebug,
|
||||||
'phantomjs' => Input::has('phantomjs'),
|
'phantomjs' => Input::has('phantomjs'),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ class AccountGatewayService extends BaseService
|
|||||||
[
|
[
|
||||||
'name',
|
'name',
|
||||||
function ($model) {
|
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">
|
<form method="POST" class="payment-form">
|
||||||
<script>
|
<script>
|
||||||
Checkout.render({
|
Checkout.render({
|
||||||
debugMode: true,
|
debugMode: {{ $checkoutComDebug }},
|
||||||
publicKey: '{{ $checkoutComKey }}',
|
publicKey: '{{ $checkoutComKey }}',
|
||||||
paymentToken: '{{ $checkoutComToken }}',
|
paymentToken: '{{ $checkoutComToken }}',
|
||||||
customerEmail: '{{ $contact->email }}',
|
customerEmail: '{{ $contact->email }}',
|
||||||
|
Loading…
Reference in New Issue
Block a user