2016-06-20 16:14:43 +02:00
|
|
|
@if ($accountGateway->getConfigField('testMode'))
|
2016-03-09 19:31:54 +01:00
|
|
|
<script src="https://sandbox.checkout.com/js/v1/checkout.js"></script>
|
|
|
|
@else
|
|
|
|
<script src="https://cdn.checkout.com/js/checkout.js"></script>
|
|
|
|
@endif
|
2016-01-18 09:30:42 +01:00
|
|
|
|
|
|
|
<form method="POST" class="payment-form">
|
|
|
|
<script>
|
|
|
|
Checkout.render({
|
2016-06-20 16:14:43 +02:00
|
|
|
debugMode: {{ $accountGateway->getConfigField('testMode') ? 'true' : 'false' }},
|
|
|
|
publicKey: '{{ $accountGateway->getConfigField('publicApiKey') }}',
|
|
|
|
paymentToken: '{{ $transactionToken }}',
|
2016-01-18 09:30:42 +01:00
|
|
|
customerEmail: '{{ $contact->email }}',
|
|
|
|
customerName: '{{ $contact->getFullName() }}',
|
|
|
|
value: {{ $invoice->getRequestedAmount() * 100 }},
|
|
|
|
currency: '{{ $invoice->getCurrencyCode() }}',
|
|
|
|
widgetContainerSelector: '.payment-form',
|
|
|
|
widgetColor: '#333',
|
|
|
|
themeColor: '#3075dd',
|
|
|
|
buttonColor:'#51c470',
|
|
|
|
cardCharged: function(event){
|
2016-06-20 16:14:43 +02:00
|
|
|
location.href = '{{ URL::to('/complete/'. $invitation->invitation_key . '/credit_card?token=' . $transactionToken) }}';
|
2016-01-18 09:30:42 +01:00
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
2016-06-20 16:14:43 +02:00
|
|
|
</form>
|