2020-06-10 17:38:10 +02:00
|
|
|
/**
|
|
|
|
* Invoice Ninja (https://invoiceninja.com)
|
|
|
|
*
|
|
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
|
|
*
|
|
|
|
* @copyright Copyright (c) 2020. Invoice Ninja LLC (https://invoiceninja.com)
|
|
|
|
*
|
|
|
|
* @license https://opensource.org/licenses/AAL
|
|
|
|
*/
|
|
|
|
|
|
|
|
window.CKOConfig = {
|
|
|
|
publicKey: document.querySelector('meta[name="public-key"]').content,
|
|
|
|
customerEmail: document.querySelector('meta[name="customer-email"]')
|
|
|
|
.content,
|
|
|
|
value: document.querySelector('meta[name="value"]').content,
|
|
|
|
currency: document.querySelector('meta[name="currency"]').content,
|
|
|
|
paymentMode: 'cards',
|
|
|
|
cardFormMode: 'cardTokenisation',
|
|
|
|
cardTokenised: function(event) {
|
|
|
|
document.querySelector(
|
|
|
|
'input[name="gateway_response"]'
|
|
|
|
).value = JSON.stringify(event.data);
|
2020-06-11 15:13:35 +02:00
|
|
|
|
|
|
|
document.querySelector(
|
|
|
|
'input[name="store_card"]'
|
2020-06-15 14:18:44 +02:00
|
|
|
).value = document.getElementById('store-card-checkbox').checked ? 1 : 0;
|
2020-06-10 17:38:10 +02:00
|
|
|
|
|
|
|
document.getElementById('server-response').submit();
|
|
|
|
},
|
|
|
|
};
|