1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00

Scaffolding Paytrace

This commit is contained in:
David Bomba 2021-07-21 07:53:11 +10:00
parent c0287085b5
commit df7d20fa76

View File

@ -39,103 +39,12 @@
// Minimal Protect.js setup call
PTPayment.setup({
styles:
{
'code': {
'font_color':'#5D99CA',
'border_color':'#EF9F6D',
'border_style':'dotted',
'font_size':'13pt',
'input_border_radius':'10px',
'input_border_width':'2px',
'input_font':'serif, cursive, fantasy',
'input_font_weight':'700',
'input_margin':'5px 0px 5px 20px',
'input_padding':'0px 5px 0px 5px',
'label_color':'#5D99CA',
'label_size':'16px',
'label_width':'150px',
'label_font':'sans-serif, arial, serif',
'label_font_weight':'bold',
'label_margin':'5px 0px 0px 20px',
'label_padding':'2px 5px 2px 5px',
'label_border_style':'dotted',
'label_border_color':'#EF9F6D',
'label_border_radius':'10px',
'label_border_width':'2px',
'background_color':'white',
'height':'25px',
'width':'110px',
'padding_bottom':'2px'
},
'cc': {
'font_color':'#5D99CA',
'border_color':'#EF9F6D',
'border_style':'solid',
'font_size':'13pt',
'input_border_radius':'20px',
'input_border_width':'2px',
'input_font':'Times New Roman, arial, fantasy',
'input_font_weight':'400',
'input_margin':'5px 0px 5px 0px',
'input_padding':'0px 5px 0px 5px',
'label_color':'#5D99CA',
'label_size':'16px',
'label_width':'150px',
'label_font':'Times New Roman, sans-serif, serif',
'label_font_weight':'light',
'label_margin':'5px 0px 0px 0px',
'label_padding':'0px 5px 0px 5px',
'label_border_style':'solid',
'label_border_color':'#EF9F6D',
'label_border_radius':'20px',
'label_border_width':'2px',
'background_color':'white',
'height':'25px',
'width':'320px',
'padding_bottom':'0px'
},
'exp': {
'font_color':'#5D99CA',
'border_color':'#EF9F6D',
'border_style':'dashed',
'font_size':'12pt',
'input_border_radius':'0px',
'input_border_width':'2px',
'input_font':'arial, cursive, fantasy',
'input_font_weight':'400',
'input_margin':'5px 0px 5px 0px',
'input_padding':'0px 5px 0px 5px',
'label_color':'#5D99CA',
'label_size':'16px',
'label_width':'150px',
'label_font':'arial, fantasy, serif',
'label_font_weight':'normal',
'label_margin':'5px 0px 0px 0px',
'label_padding':'2px 5px 2px 5px',
'label_border_style':'dashed',
'label_border_color':'#EF9F6D',
'label_border_radius':'0px',
'label_border_width':'2px',
'background_color':'white',
'height':'25px',
'width':'85px',
'padding_bottom':'2px',
'type':'dropdown'
},
'body': {
'background_color':'white'
}
},
authorization: { clientKey: "{!! $client_key !!}" }
}).then(function(instance){
//use instance object to process and tokenize sensitive data payment fields.
PTPayment.theme('above the line');
});
// this can be any event we chose. We will use the submit event and stop any default event handling and prevent event handling bubbling.
document.getElementById("ProtectForm").addEventListener("submit",function(e){
e.preventDefault();
@ -157,6 +66,12 @@ PTPayment.validate(function(validationErrors) {
}
});// end of PTPayment.validate
});// end of add event listener submit
});
</script>
@endsection