payment Card first 4 payments inc. mails

This commit is contained in:
Kevin Adametz 2019-02-28 18:09:54 +01:00
parent c20deac3fe
commit 6e3adac4d7
38 changed files with 3063 additions and 921 deletions

View file

@ -80,6 +80,87 @@
jQuery('.quick-cart-box').css('display', 'none');
});
function showCreditCardPayment(val){
console.log(val);
if(val === 'cc'){
$('#creditcard-box-holder').show('slow');
}else{
$('#creditcard-box-holder').hide('slow');
}
}
showCreditCardPayment(jQuery('input[name="payment_method"]:checked').val());
jQuery('input[name="payment_method"]').on('change', function () {
showCreditCardPayment($(this).val());
});
</script>
{{--
<script type="text/javascript" src="https://secure.pay1.de/client-api/js/v1/payone_hosted_min.js"></script>
<script>
$(document).ready(function() {
$('#cc_cardtype')
$('#cc_cardholder_first')
$('#cc_cardholder_last')
$('#cc_cardpan')
var data = {
request : 'creditcardcheck',
responsetype : 'REDIRECT', // JSON or REDIRECT available
mode : 'live',
mid : '10000',
aid : '10001',
portalid : '2000000',
encoding : 'UTF-8',
storecarddata : 'yes',
hash : '19062005567ca72601cc9d031f9a94b1',
cardholder : document.Testform.cardholder.value,
cardpan : document.Testform.cardpan.value,
cardtype : document.Testform.cardtype.value,
cardexpiremonth : document.Testform.cardexpiremonth.value,
cardexpireyear : document.Testform.cardexpireyear.value,
cardcvc2 : document.Testform.cardcvc2.value,
language : 'en'
};
var options = {
return_type : 'object',
callbackFunctionName: 'processPayoneResponse'
};
function processPayoneResponse(response) {
if (response.get('status') == 'VALID') {
document.Testform.cardpan.value=;
document.Testform.cardcvc2.value=;
document.Testform.pseudocardpan.value=response.get('pseudocardpan')
document.Testform.submit();
}
else {
alert(response.get('customermessage'));
}
}
var request = new PayoneRequest(data, options);
request.checkAndStore();
});
}
/* JSON response example
{
"status" : "ERROR",
"errorcode" : "1078",
"errormessage" : "Parameter {cardpan} incorrect or missing",
"customermessage" : "Invalid cardpan. Please check the information on the card.",
}
*/
</script>
--}}
</body>
</html>