adyen-skinbuilder 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/adyen/main_content.html +673 -5
- data/lib/adyen-skinbuilder/server.rb +11 -2
- data/lib/adyen-skinbuilder/version.rb +1 -1
- metadata +4 -4
data/adyen/main_content.html
CHANGED
@@ -556,11 +556,6 @@
|
|
556
556
|
|
557
557
|
displayAmountExtras['card'] = "";
|
558
558
|
|
559
|
-
|
560
|
-
|
561
|
-
addOnLoad(function () {
|
562
|
-
setTimeout("show(collapsevisa, 'completeCard.shtml', 'card', 'visa')",100);
|
563
|
-
});
|
564
559
|
|
565
560
|
if (notNull(document.getElementById('pmmform-visa'))) {
|
566
561
|
document.getElementById('pmmform-visa').setAttribute("autocomplete","off");
|
@@ -568,6 +563,679 @@
|
|
568
563
|
</script>
|
569
564
|
</div>
|
570
565
|
</li>
|
566
|
+
|
567
|
+
<li style="list-style-type: none;">
|
568
|
+
<input type="submit" name="brandName" value="Credit Card" class="imgB pmB pmBcard"
|
569
|
+
|
570
|
+
onclick="return show(collapsecard, 'completeCard.shtml', 'card', 'vias');"
|
571
|
+
|
572
|
+
/>
|
573
|
+
|
574
|
+
<span id="pmmextracosts-card" class="pmmextracosts">
|
575
|
+
</span>
|
576
|
+
|
577
|
+
<span id="pmcarddescription" class="pmmdescription"></span>
|
578
|
+
<div id="pmmdetails-card" class="pmmdetails">
|
579
|
+
<script type="text/javascript">
|
580
|
+
//<![CDATA[
|
581
|
+
/* Form validation */
|
582
|
+
requiredFields["card"] = new Array();
|
583
|
+
requiredFields["card"].push("cardHolderName");
|
584
|
+
requiredFields["card"].push("cardNumber");
|
585
|
+
requiredFields["card"].push("expiryMonth");
|
586
|
+
requiredFields["card"].push("expiryYear");
|
587
|
+
errorMessages["card"] = new Array();
|
588
|
+
errorMessages["card"]["cardHolderName"] = "Card Holder Name missing";
|
589
|
+
errorMessages["card"]["cardNumber"] = "Card Number invalid or missing";
|
590
|
+
errorMessages["card"]["expiryMonth"] = "Expiry Month missing";
|
591
|
+
errorMessages["card"]["expiryYear"] = "Expiry Year missing";
|
592
|
+
errorMessages["card"]["cvcCode"] = "CVC/CVV/CID missing";
|
593
|
+
errorMessages["card"]["generic"] = "Please enter your card details";
|
594
|
+
|
595
|
+
|
596
|
+
var cvcinfo = new Array();
|
597
|
+
cvcinfo["mc"] = "<h3>What is CVC?<\/h3>" +
|
598
|
+
"<p><img style=\"margin-right: 5px\" class=\"fl\" src=\"/hpp/img/CVC_mini.jpg\" alt=\"CVC location\" />" +
|
599
|
+
"The Card Validation Code (CVC) is an <i>additional<\/i> " +
|
600
|
+
"three-digit security code that is printed (not embossed) on the back " +
|
601
|
+
"of your card.<\/p>" +
|
602
|
+
"<p>The CVC is an extra security measure to ensure that you are in possession of the card.<\/p><br style=\"clear: both\" />";
|
603
|
+
cvcinfo["visa"] = "<h3>What is CVV?<\/h3>" +
|
604
|
+
"<p><img style=\"margin-right: 5px\" class=\"fl\" src=\"/hpp/img/CVV_mini.jpg\" alt=\"CVV location\" />" +
|
605
|
+
"The Card Verification Value (CVV) is an <i>additional<\/i> " +
|
606
|
+
"three-digit security code that is printed (not embossed) on the back " +
|
607
|
+
"of your card.<\/p>" +
|
608
|
+
"<p>The CVV is an extra security measure to ensure that you are in possession of the card.<\/p><br style=\"clear: both\" />";
|
609
|
+
cvcinfo["amex"] = "<h3>What is CID?<\/h3>" +
|
610
|
+
"<p><img style=\"margin-right: 5px\" class=\"fl\" src=\"/hpp/img/CID_mini.jpg\" alt=\"CID location\" />" +
|
611
|
+
"The Card IDentification (CID) is an <i>additional<\/i> " +
|
612
|
+
"four-digit security code that is printed (not embossed) on the front " +
|
613
|
+
"of your card.<\/p>" +
|
614
|
+
"<p>The CID is an extra security measure to ensure that you are in possession of the card.<\/p><br style=\"clear: both\" />";
|
615
|
+
cvcinfo["card"] = "<h3>What is CVC\/CVV\/CID?<\/h3>" +
|
616
|
+
"<p>The Card Security Code (CVC\/CVV\/CID) is an <i>additional<\/i> " +
|
617
|
+
"three or four digit security code that is printed (not embossed) on the front or the back " +
|
618
|
+
"of your card.<\/p>" +
|
619
|
+
"<p>The CVC\/CVV\/CID is an extra security measure to ensure that you are in possession of the card.<\/p><br style=\"clear: both\" />";
|
620
|
+
|
621
|
+
var card_types = new Array();
|
622
|
+
var card_logos = new Array();
|
623
|
+
var card_displayAmountExtras = new Array();
|
624
|
+
var card_extras = new Array();
|
625
|
+
var previousCardNumber ="";
|
626
|
+
var card_subVariantExtras = new Object();
|
627
|
+
var card_subVariantExtrasPhrase = new Object();
|
628
|
+
var originalExtraCostPhrase = document.getElementById('pmmextracosts-card').innerHTML;
|
629
|
+
|
630
|
+
card_types.push("vias");
|
631
|
+
card_logos.push("/img/pm/vias");
|
632
|
+
card_displayAmountExtras.push("");
|
633
|
+
card_extras.push("");
|
634
|
+
|
635
|
+
card_subVariantExtras['vias'] = "";
|
636
|
+
card_subVariantExtrasPhrase['vias'] = "";
|
637
|
+
card_types.push("amex");
|
638
|
+
card_logos.push("/img/pm/amex");
|
639
|
+
card_displayAmountExtras.push("");
|
640
|
+
card_extras.push("");
|
641
|
+
|
642
|
+
card_subVariantExtras['amex'] = "";
|
643
|
+
card_subVariantExtrasPhrase['amex'] = "";
|
644
|
+
card_types.push("mc");
|
645
|
+
card_logos.push("/img/pm/mc");
|
646
|
+
card_displayAmountExtras.push("");
|
647
|
+
card_extras.push("");
|
648
|
+
|
649
|
+
card_subVariantExtras['mcatm'] = "";
|
650
|
+
card_subVariantExtrasPhrase['mcatm'] = "";
|
651
|
+
card_subVariantExtras['mccredit'] = "";
|
652
|
+
card_subVariantExtrasPhrase['mccredit'] = "";
|
653
|
+
card_subVariantExtras['maestro'] = "";
|
654
|
+
card_subVariantExtrasPhrase['maestro'] = "";
|
655
|
+
card_subVariantExtras['mc'] = "";
|
656
|
+
card_subVariantExtrasPhrase['mc'] = "";
|
657
|
+
card_subVariantExtras['bijcard'] = "";
|
658
|
+
card_subVariantExtrasPhrase['bijcard'] = "";
|
659
|
+
card_subVariantExtras['cirrus'] = "";
|
660
|
+
card_subVariantExtrasPhrase['cirrus'] = "";
|
661
|
+
card_subVariantExtras['mcpro'] = "";
|
662
|
+
card_subVariantExtrasPhrase['mcpro'] = "";
|
663
|
+
card_subVariantExtras['bcmc'] = "";
|
664
|
+
card_subVariantExtrasPhrase['bcmc'] = "";
|
665
|
+
card_subVariantExtras['mccommercialcredit'] = "";
|
666
|
+
card_subVariantExtrasPhrase['mccommercialcredit'] = "";
|
667
|
+
card_subVariantExtras['mcdebit'] = "";
|
668
|
+
card_subVariantExtrasPhrase['mcdebit'] = "";
|
669
|
+
card_subVariantExtras['mccorporate'] = "";
|
670
|
+
card_subVariantExtrasPhrase['mccorporate'] = "";
|
671
|
+
card_types.push("visa");
|
672
|
+
card_logos.push("/img/pm/visa");
|
673
|
+
card_displayAmountExtras.push("");
|
674
|
+
card_extras.push("");
|
675
|
+
|
676
|
+
card_subVariantExtras['visacorporate'] = "";
|
677
|
+
card_subVariantExtrasPhrase['visacorporate'] = "";
|
678
|
+
card_subVariantExtras['travelmoney'] = "";
|
679
|
+
card_subVariantExtrasPhrase['travelmoney'] = "";
|
680
|
+
card_subVariantExtras['visabusiness'] = "";
|
681
|
+
card_subVariantExtrasPhrase['visabusiness'] = "";
|
682
|
+
card_subVariantExtras['visahipotecario'] = "";
|
683
|
+
card_subVariantExtrasPhrase['visahipotecario'] = "";
|
684
|
+
card_subVariantExtras['visacredit'] = "";
|
685
|
+
card_subVariantExtrasPhrase['visacredit'] = "";
|
686
|
+
card_subVariantExtras['visapurchasing'] = "";
|
687
|
+
card_subVariantExtrasPhrase['visapurchasing'] = "";
|
688
|
+
card_subVariantExtras['visaproprietary'] = "";
|
689
|
+
card_subVariantExtrasPhrase['visaproprietary'] = "";
|
690
|
+
card_subVariantExtras['visaclassic'] = "";
|
691
|
+
card_subVariantExtrasPhrase['visaclassic'] = "";
|
692
|
+
card_subVariantExtras['visaplatinum'] = "";
|
693
|
+
card_subVariantExtrasPhrase['visaplatinum'] = "";
|
694
|
+
card_subVariantExtras['visasignature'] = "";
|
695
|
+
card_subVariantExtrasPhrase['visasignature'] = "";
|
696
|
+
card_subVariantExtras['electron'] = "";
|
697
|
+
card_subVariantExtrasPhrase['electron'] = "";
|
698
|
+
card_subVariantExtras['visacommercialcredit'] = "";
|
699
|
+
card_subVariantExtrasPhrase['visacommercialcredit'] = "";
|
700
|
+
card_subVariantExtras['visagold'] = "";
|
701
|
+
card_subVariantExtrasPhrase['visagold'] = "";
|
702
|
+
card_subVariantExtras['visa'] = "";
|
703
|
+
card_subVariantExtrasPhrase['visa'] = "";
|
704
|
+
card_subVariantExtras['visadebit'] = "";
|
705
|
+
card_subVariantExtrasPhrase['visadebit'] = "";
|
706
|
+
|
707
|
+
|
708
|
+
var baseURL = "/hpp/";
|
709
|
+
if(baseURL.indexOf(";jsession") != -1) {
|
710
|
+
baseURL = baseURL.substr(0,baseURL.indexOf(";jsession"));
|
711
|
+
}
|
712
|
+
|
713
|
+
function validateCcNumber(e, dontHideErrorFrame) {
|
714
|
+
cardNumber = (document.getElementById('cardNumber').value);
|
715
|
+
|
716
|
+
if(cardNumber.length <= previousCardNumber.length) {
|
717
|
+
previousCardNumber = cardNumber;
|
718
|
+
if (cardNumber.length == 0) {
|
719
|
+
resetExtraCost();
|
720
|
+
}
|
721
|
+
return;
|
722
|
+
}
|
723
|
+
var l=0;
|
724
|
+
while(l < previousCardNumber.length) {
|
725
|
+
if(cardNumber[l] != previousCardNumber[l]) {
|
726
|
+
previousCardNumber = cardNumber;
|
727
|
+
return;
|
728
|
+
}
|
729
|
+
l++;
|
730
|
+
}
|
731
|
+
|
732
|
+
reg = /\s+/g;
|
733
|
+
cardNumber = cardNumber.replace(reg,'');
|
734
|
+
|
735
|
+
nrOfDigits = cardNumber.length;
|
736
|
+
|
737
|
+
if(nrOfDigits > 19){
|
738
|
+
ccNumberPresentation(false);
|
739
|
+
return;
|
740
|
+
}
|
741
|
+
|
742
|
+
ccNumberPresentation(true,dontHideErrorFrame);
|
743
|
+
|
744
|
+
baseCard = getBaseCard(cardNumber,card_types);
|
745
|
+
if(baseCard != null) {
|
746
|
+
setCardBrand(baseCard, true);
|
747
|
+
} else if(nrOfDigits > 4) {
|
748
|
+
setCardBrand(null, true);
|
749
|
+
ccNumberPresentation(false);
|
750
|
+
} else {
|
751
|
+
setCardBrand(null, false);
|
752
|
+
}
|
753
|
+
|
754
|
+
if (cardNumber.length < 6) {
|
755
|
+
setExtraCost(baseCard, null);
|
756
|
+
} else if (cardNumber.length == 6 || cardNumber.length == 9 || cardNumber.length == 12){
|
757
|
+
_.X("/hpp/binLookup.shtml",function(d,r){
|
758
|
+
if(r.status != 200 || d.indexOf('"result"') == -1) return false;
|
759
|
+
var response=eval("("+d+")");
|
760
|
+
|
761
|
+
if(typeof(response.result)=='undefined') return false;
|
762
|
+
|
763
|
+
if (response.result == 0) {
|
764
|
+
lookedUpCardType = response.cardType;
|
765
|
+
} else {
|
766
|
+
lookedUpCardType = null;
|
767
|
+
}
|
768
|
+
setExtraCost(baseCard, lookedUpCardType);
|
769
|
+
|
770
|
+
return true;
|
771
|
+
}, 'bin='+cardNumber+'&'+_.Q(_.G("pageform")));
|
772
|
+
}
|
773
|
+
|
774
|
+
//show value with white space after four numbers
|
775
|
+
result = cardNumber.replace(/(\d{4})/g, '$1 ');
|
776
|
+
result = result.replace(/\s+$/, ''); //remove trailing spaces
|
777
|
+
|
778
|
+
previousCardNumber = result;
|
779
|
+
document.getElementById('cardNumber').value = result;
|
780
|
+
}
|
781
|
+
|
782
|
+
function setExtraCost(selectedCard, lookedUpCard) {
|
783
|
+
var extraCostDisplayed = false;
|
784
|
+
if (lookedUpCard != null && card_subVariantExtras[lookedUpCard] != null) {
|
785
|
+
document.getElementById('extraCostAmount').innerHTML = card_subVariantExtras[lookedUpCard];
|
786
|
+
displayAmountExtras['card'] = card_subVariantExtras[lookedUpCard];
|
787
|
+
document.getElementById('pmmextracosts-card').innerHTML = card_subVariantExtrasPhrase[lookedUpCard];
|
788
|
+
extraCostDisplayed = true;
|
789
|
+
} else {
|
790
|
+
for(var i = 0; i < card_types.length; ++i) {
|
791
|
+
if(selectedCard != null && card_types[i] == selectedCard.cardtype && card_subVariantExtras[selectedCard.cardtype] != null) {
|
792
|
+
document.getElementById('extraCostAmount').innerHTML = card_subVariantExtras[selectedCard.cardtype];
|
793
|
+
displayAmountExtras['card'] = card_subVariantExtras[selectedCard.cardtype];
|
794
|
+
document.getElementById('pmmextracosts-card').innerHTML = card_subVariantExtrasPhrase[selectedCard.cardtype];
|
795
|
+
extraCostDisplayed = true;
|
796
|
+
}
|
797
|
+
}
|
798
|
+
}
|
799
|
+
|
800
|
+
if (!extraCostDisplayed) {
|
801
|
+
resetExtraCost();
|
802
|
+
}
|
803
|
+
}
|
804
|
+
|
805
|
+
function resetExtraCost() {
|
806
|
+
displayAmountExtras['card'] = "";
|
807
|
+
document.getElementById('extraCostAmount').innerHTML = "";
|
808
|
+
document.getElementById('pmmextracosts-card').innerHTML = originalExtraCostPhrase;
|
809
|
+
}
|
810
|
+
|
811
|
+
function setCardBrand(selectedCard, greyInactive) {
|
812
|
+
|
813
|
+
for(var i = 0; i < card_types.length; ++i) {
|
814
|
+
var imageId = "cclogo" + i;
|
815
|
+
if(selectedCard != null && card_types[i] == selectedCard.cardtype) {
|
816
|
+
document.getElementById(imageId).src=baseURL + card_logos[i] + "_small.png";
|
817
|
+
} else {
|
818
|
+
if(greyInactive) {
|
819
|
+
document.getElementById(imageId).src=baseURL + card_logos[i] + "_small_grey.png";
|
820
|
+
} else {
|
821
|
+
document.getElementById(imageId).src=baseURL + card_logos[i] + "_small.png";
|
822
|
+
}
|
823
|
+
}
|
824
|
+
document.getElementById(imageId).style.display="inline";
|
825
|
+
}
|
826
|
+
if(selectedCard != null) {
|
827
|
+
if(selectedCard.cardtype == "amex") {
|
828
|
+
document.getElementById("cvcCode").maxLength = 4;
|
829
|
+
document.getElementById('cvcName').innerHTML = "CID";
|
830
|
+
document.getElementById('cvcWhatIs').innerHTML = "What is CID?";
|
831
|
+
document.getElementById('cvcFrame').innerHTML = cvcinfo["amex"];
|
832
|
+
} else if (selectedCard.cardtype == "visa" || selectedCard.cardtype == "electron") {
|
833
|
+
document.getElementById("cvcCode").maxLength = 3;
|
834
|
+
document.getElementById('cvcName').innerHTML = "CVV";
|
835
|
+
document.getElementById('cvcWhatIs').innerHTML = "What is CVV?";
|
836
|
+
document.getElementById('cvcFrame').innerHTML = cvcinfo["visa"];
|
837
|
+
} else if (selectedCard.cardtype == "mc" || selectedCard.cardtype == "maestro" || selectedCard.cardtype == "maestrouk" || selectedCard.cardtype == "solo" ) {
|
838
|
+
document.getElementById("cvcCode").maxLength = 3;
|
839
|
+
document.getElementById('cvcName').innerHTML = "CVC";
|
840
|
+
document.getElementById('cvcWhatIs').innerHTML = "What is CVC?";
|
841
|
+
document.getElementById('cvcFrame').innerHTML = cvcinfo["mc"];
|
842
|
+
} else {
|
843
|
+
document.getElementById("cvcCode").maxLength = 3;
|
844
|
+
document.getElementById('cvcName').innerHTML = "CVC";
|
845
|
+
document.getElementById('cvcWhatIs').innerHTML = "What is CVC?";
|
846
|
+
document.getElementById('cvcFrame').innerHTML = cvcinfo["card"];
|
847
|
+
}
|
848
|
+
}
|
849
|
+
}
|
850
|
+
|
851
|
+
function ccNumberPresentation(valid, dontHideErrorFrame){
|
852
|
+
var errors = new Array();
|
853
|
+
errors.push("cardNumber");
|
854
|
+
if(valid){
|
855
|
+
clearErrors(errors, dontHideErrorFrame);
|
856
|
+
}
|
857
|
+
else{
|
858
|
+
markErrorFields(errors);
|
859
|
+
}
|
860
|
+
}
|
861
|
+
|
862
|
+
function blockNonNumbers(e) {
|
863
|
+
var key;
|
864
|
+
var isCtrl = false;
|
865
|
+
var keychar;
|
866
|
+
var reg;
|
867
|
+
|
868
|
+
if(window.event) {
|
869
|
+
key = e.keyCode;
|
870
|
+
isCtrl = window.event.ctrlKey
|
871
|
+
}
|
872
|
+
else if(e.which) {
|
873
|
+
key = e.which;
|
874
|
+
isCtrl = e.ctrlKey;
|
875
|
+
}
|
876
|
+
|
877
|
+
if (isNaN(key)) return true;
|
878
|
+
|
879
|
+
keychar = String.fromCharCode(key);
|
880
|
+
|
881
|
+
// check for backspace or delete, or if Ctrl was pressed
|
882
|
+
if (key == 8 || isCtrl) {
|
883
|
+
return true;
|
884
|
+
}
|
885
|
+
|
886
|
+
reg = /[\d ]/;
|
887
|
+
|
888
|
+
return reg.test(keychar);
|
889
|
+
}
|
890
|
+
|
891
|
+
validationFunctions
|
892
|
+
function doCCCheck(){
|
893
|
+
cardNumber = (document.getElementById('cardNumber').value);
|
894
|
+
reg = /\s+/g;
|
895
|
+
cardNumber = cardNumber.replace(reg,'');
|
896
|
+
if(!luhnCheck(cardNumber))
|
897
|
+
ccNumberPresentation(false);
|
898
|
+
else
|
899
|
+
ccNumberPresentation(true);
|
900
|
+
}
|
901
|
+
|
902
|
+
validationFunctions["card"] = new Array();
|
903
|
+
validationFunctions["card"]["cardNumber"] = function (cardNumberField) {
|
904
|
+
cardNumber = cardNumberField.value;
|
905
|
+
reg = /\s+/g;
|
906
|
+
cardNumber = cardNumber.replace(reg,'');
|
907
|
+
if(cardNumber == "" || luhnCheck(cardNumber)){
|
908
|
+
return true;
|
909
|
+
}
|
910
|
+
return false;
|
911
|
+
}
|
912
|
+
|
913
|
+
|
914
|
+
|
915
|
+
//]]>
|
916
|
+
</script>
|
917
|
+
|
918
|
+
<table class="basetable">
|
919
|
+
<tr>
|
920
|
+
<td class="mid"><div id="cclogoheader" style="display: none">Card Type</div></td>
|
921
|
+
|
922
|
+
<td class="mid">
|
923
|
+
<div style="height: 25px" id="cclogo">
|
924
|
+
<img alt="" id="cclogo0" style="display: none" class="mid" src="/hpp/img/pm/unknown_small.png" />
|
925
|
+
<img alt="" id="cclogo1" style="display: none" class="mid" src="/hpp/img/pm/unknown_small.png" />
|
926
|
+
<img alt="" id="cclogo2" style="display: none" class="mid" src="/hpp/img/pm/unknown_small.png" />
|
927
|
+
<img alt="" id="cclogo3" style="display: none" class="mid" src="/hpp/img/pm/unknown_small.png" />
|
928
|
+
<img alt="" id="cclogo4" style="display: none" class="mid" src="/hpp/img/pm/unknown_small.png" />
|
929
|
+
<img alt="" id="cclogo5" style="display: none" class="mid" src="/hpp/img/pm/unknown_small.png" />
|
930
|
+
<img alt="" id="cclogo6" style="display: none" class="mid" src="/hpp/img/pm/unknown_small.png" />
|
931
|
+
|
932
|
+
<img alt="" id="cclogo7" style="display: none" class="mid" src="/hpp/img/pm/unknown_small.png" />
|
933
|
+
<img alt="" id="cclogo8" style="display: none" class="mid" src="/hpp/img/pm/unknown_small.png" />
|
934
|
+
<script type="text/javascript">
|
935
|
+
setCardBrand(null, false);
|
936
|
+
</script>
|
937
|
+
</div>
|
938
|
+
</td>
|
939
|
+
</tr>
|
940
|
+
<tr id="cardNumberTr">
|
941
|
+
<td><div>Card Number</div></td>
|
942
|
+
<td><div class="fieldDiv"><input type="text" class="inputField" id="cardNumber"
|
943
|
+
onkeypress="return blockNonNumbers(event)" onkeyup="validateCcNumber(event)" onblur="validateCcNumber(event)" onchange="doCCCheck()"
|
944
|
+
name="cardNumber" value="" size="24" maxlength="23"
|
945
|
+
/></div></td>
|
946
|
+
|
947
|
+
</tr>
|
948
|
+
<tr>
|
949
|
+
<td><div>Card Holder Name</div></td>
|
950
|
+
<td><div class="fieldDiv"><input type="text" class="inputField" id="cardHolderName" name="cardHolderName" value="" size="19" maxlength="30" /></div></td>
|
951
|
+
</tr>
|
952
|
+
|
953
|
+
<tr>
|
954
|
+
<td><div>Card Expiry Date</div></td><td>
|
955
|
+
<div class="fieldDiv">
|
956
|
+
<select class="inputField" name="expiryMonth" id="expiryMonth" size="1">
|
957
|
+
|
958
|
+
<option value="*"> </option>
|
959
|
+
<option value="01">01</option>
|
960
|
+
<option value="02">02</option>
|
961
|
+
<option value="03">03</option>
|
962
|
+
<option value="04">04</option>
|
963
|
+
<option value="05">05</option>
|
964
|
+
|
965
|
+
<option value="06">06</option>
|
966
|
+
<option value="07">07</option>
|
967
|
+
<option value="08">08</option>
|
968
|
+
<option value="09">09</option>
|
969
|
+
<option value="10">10</option>
|
970
|
+
<option value="11">11</option>
|
971
|
+
|
972
|
+
<option value="12">12</option>
|
973
|
+
</select>
|
974
|
+
/
|
975
|
+
<select class="inputField" name="expiryYear" id="expiryYear" size="1">
|
976
|
+
<option value="*"> </option>
|
977
|
+
<option value="2011">2011</option>
|
978
|
+
<option value="2012">2012</option>
|
979
|
+
|
980
|
+
<option value="2013">2013</option>
|
981
|
+
<option value="2014">2014</option>
|
982
|
+
<option value="2015">2015</option>
|
983
|
+
<option value="2016">2016</option>
|
984
|
+
<option value="2017">2017</option>
|
985
|
+
<option value="2018">2018</option>
|
986
|
+
|
987
|
+
<option value="2019">2019</option>
|
988
|
+
<option value="2020">2020</option>
|
989
|
+
<option value="2021">2021</option>
|
990
|
+
<option value="2022">2022</option>
|
991
|
+
<option value="2023">2023</option>
|
992
|
+
<option value="2024">2024</option>
|
993
|
+
|
994
|
+
<option value="2025">2025</option>
|
995
|
+
<option value="2026">2026</option>
|
996
|
+
<option value="2027">2027</option>
|
997
|
+
</select>
|
998
|
+
</div>
|
999
|
+
</td>
|
1000
|
+
</tr>
|
1001
|
+
|
1002
|
+
<tr>
|
1003
|
+
<td><div id="cvcName">CVC/CVV/CID</div></td>
|
1004
|
+
<td><div class="fieldDiv"><input class="inputField" type="text" name="cvcCode" value="" id="cvcCode" size="7" maxlength="3" /> <a href="#" onclick="return toggleElement('cvcFrame');"><span id="cvcWhatIs">What is CVC/CVV/CID?</span></a></div></td>
|
1005
|
+
</tr>
|
1006
|
+
|
1007
|
+
|
1008
|
+
<tr>
|
1009
|
+
<td colspan="2"><div class="r">
|
1010
|
+
<input class="paySubmit paySubmitcard" type="submit" name="pay" value="pay" />
|
1011
|
+
|
1012
|
+
</div></td>
|
1013
|
+
</tr>
|
1014
|
+
</table>
|
1015
|
+
|
1016
|
+
|
1017
|
+
<div class="popupMsg popupMsgOPP " style="display: none;" onclick="return hideElement('cvcFrame');" id="cvcFrame">
|
1018
|
+
<h3>What is CVC/CVV/CID?</h3>
|
1019
|
+
<p>The Card Security Code (CVC/CVV/CID) is an <i>additional</i>
|
1020
|
+
three or four digit security code that is printed (not embossed) on the front or the back
|
1021
|
+
of your card.</p>
|
1022
|
+
|
1023
|
+
<p>The CVC/CVV/CID is an extra security measure to ensure that you are in possession of the card.</p>
|
1024
|
+
</div>
|
1025
|
+
|
1026
|
+
|
1027
|
+
<script type="text/javascript">
|
1028
|
+
//<![CDATA[
|
1029
|
+
|
1030
|
+
if(document.getElementById('cardNumber').value.length > 0) {
|
1031
|
+
var validateCcNumberTimer = setTimeout('validateCcNumber(null,true)', 2500);
|
1032
|
+
}
|
1033
|
+
|
1034
|
+
//]]>
|
1035
|
+
</script>
|
1036
|
+
|
1037
|
+
<script type="text/javascript">
|
1038
|
+
var collapsecard = new animatedcollapse("pmmdetails-card", 1000, false, false, config["pmmanimation"]==1?false:true);
|
1039
|
+
details.push(collapsecard);
|
1040
|
+
|
1041
|
+
displayAmountExtras['card'] = "";
|
1042
|
+
|
1043
|
+
|
1044
|
+
|
1045
|
+
|
1046
|
+
if (notNull(document.getElementById('pmmform-card'))) {
|
1047
|
+
document.getElementById('pmmform-card').setAttribute("autocomplete","off");
|
1048
|
+
}
|
1049
|
+
</script>
|
1050
|
+
</div>
|
1051
|
+
</li>
|
1052
|
+
|
1053
|
+
<li style="list-style-type: none;">
|
1054
|
+
|
1055
|
+
<input type="submit" name="brandName" value="iDEAL" class="imgB pmB pmBideal"
|
1056
|
+
|
1057
|
+
onclick="return show(collapseideal, 'redirectIdeal.shtml', 'ideal', 'ideal');"
|
1058
|
+
|
1059
|
+
/>
|
1060
|
+
<span id="pmmextracosts-ideal" class="pmmextracosts">
|
1061
|
+
</span>
|
1062
|
+
|
1063
|
+
<span id="pmidealdescription" class="pmmdescription"></span>
|
1064
|
+
<div id="pmmdetails-ideal" class="pmmdetails">
|
1065
|
+
|
1066
|
+
<script type="text/javascript">
|
1067
|
+
//<![CDATA[
|
1068
|
+
/* Form validation */
|
1069
|
+
errorMessages["ideal"] = new Array();
|
1070
|
+
errorMessages["ideal"]["idealIssuerId"] = "U heeft een ongeldige bank gekozen";
|
1071
|
+
//]]>
|
1072
|
+
</script>
|
1073
|
+
|
1074
|
+
<style type="text/css">
|
1075
|
+
.idealButton {
|
1076
|
+
width:120px;
|
1077
|
+
height:40px;
|
1078
|
+
border:0px;
|
1079
|
+
font-size:0;
|
1080
|
+
cursor: pointer; /* hand-shaped cursor */
|
1081
|
+
cursor: hand; /* for IE 5.x */
|
1082
|
+
}
|
1083
|
+
.idealButtonPadding {
|
1084
|
+
padding-left: 20px;
|
1085
|
+
}
|
1086
|
+
</style>
|
1087
|
+
|
1088
|
+
<table class="basetable">
|
1089
|
+
|
1090
|
+
|
1091
|
+
|
1092
|
+
|
1093
|
+
<tr>
|
1094
|
+
<td>
|
1095
|
+
<input type="submit" class="idealButton" style="background-image: url(/hpp/img/pm/TESTBANK1.png);" value="1121" name="idealIssuer"/>
|
1096
|
+
</td>
|
1097
|
+
|
1098
|
+
|
1099
|
+
|
1100
|
+
<td class="idealButtonPadding">
|
1101
|
+
<input type="submit" class="idealButton" style="background-image: url(/hpp/img/pm/TESTBANK2.png);" value="1151" name="idealIssuer"/>
|
1102
|
+
</td>
|
1103
|
+
|
1104
|
+
</tr>
|
1105
|
+
|
1106
|
+
|
1107
|
+
|
1108
|
+
<tr>
|
1109
|
+
<td>
|
1110
|
+
<input type="submit" class="idealButton" style="background-image: url(/hpp/img/pm/TESTBANK3.png);" value="1152" name="idealIssuer"/>
|
1111
|
+
</td>
|
1112
|
+
|
1113
|
+
|
1114
|
+
|
1115
|
+
<td class="idealButtonPadding">
|
1116
|
+
<input type="submit" class="idealButton" style="background-image: url(/hpp/img/pm/TESTBANK4.png);" value="1153" name="idealIssuer"/>
|
1117
|
+
</td>
|
1118
|
+
</tr>
|
1119
|
+
|
1120
|
+
|
1121
|
+
|
1122
|
+
|
1123
|
+
<tr>
|
1124
|
+
<td>
|
1125
|
+
<input type="submit" class="idealButton" style="background-image: url(/hpp/img/pm/TESTBANK5.png);" value="1154" name="idealIssuer"/>
|
1126
|
+
</td>
|
1127
|
+
|
1128
|
+
|
1129
|
+
|
1130
|
+
<td class="idealButtonPadding">
|
1131
|
+
<input type="submit" class="idealButton" style="background-image: url(/hpp/img/pm/TESTBANK6.png);" value="1155" name="idealIssuer"/>
|
1132
|
+
</td>
|
1133
|
+
</tr>
|
1134
|
+
|
1135
|
+
|
1136
|
+
|
1137
|
+
<tr>
|
1138
|
+
|
1139
|
+
<td>
|
1140
|
+
<input type="submit" class="idealButton" style="background-image: url(/hpp/img/pm/TESTBANK7.png);" value="1156" name="idealIssuer"/>
|
1141
|
+
</td>
|
1142
|
+
|
1143
|
+
|
1144
|
+
|
1145
|
+
<td class="idealButtonPadding">
|
1146
|
+
<input type="submit" class="idealButton" style="background-image: url(/hpp/img/pm/TESTBANK8.png);" value="1157" name="idealIssuer"/>
|
1147
|
+
</td>
|
1148
|
+
</tr>
|
1149
|
+
|
1150
|
+
|
1151
|
+
|
1152
|
+
<tr>
|
1153
|
+
<td>
|
1154
|
+
|
1155
|
+
<input type="submit" class="idealButton" style="background-image: url(/hpp/img/pm/TESTBANK9.png);" value="1158" name="idealIssuer"/>
|
1156
|
+
</td>
|
1157
|
+
|
1158
|
+
|
1159
|
+
|
1160
|
+
<td class="idealButtonPadding">
|
1161
|
+
<input type="submit" class="idealButton" style="background-image: url(/hpp/img/pm/TESTBANK10.png);" value="1159" name="idealIssuer"/>
|
1162
|
+
</td>
|
1163
|
+
</tr>
|
1164
|
+
|
1165
|
+
|
1166
|
+
|
1167
|
+
|
1168
|
+
<tr>
|
1169
|
+
<td>
|
1170
|
+
<input type="submit" class="idealButton" style="background-image: url(/hpp/img/pm/TESTBANKREFUSED.png);" value="1160" name="idealIssuer"/>
|
1171
|
+
|
1172
|
+
</td>
|
1173
|
+
|
1174
|
+
|
1175
|
+
|
1176
|
+
<td class="idealButtonPadding">
|
1177
|
+
<input type="submit" class="idealButton" style="background-image: url(/hpp/img/pm/TESTBANKPENDING.png);" value="1161" name="idealIssuer"/>
|
1178
|
+
</td>
|
1179
|
+
</tr>
|
1180
|
+
|
1181
|
+
|
1182
|
+
|
1183
|
+
<tr>
|
1184
|
+
<td>
|
1185
|
+
<input type="submit" class="idealButton" style="background-image: url(/hpp/img/pm/TESTBANKCANCELLED.png);" value="1162" name="idealIssuer"/>
|
1186
|
+
</td>
|
1187
|
+
|
1188
|
+
|
1189
|
+
<td></td>
|
1190
|
+
</tr>
|
1191
|
+
</tr>
|
1192
|
+
|
1193
|
+
<tr>
|
1194
|
+
<td colspan="2"><div class="fieldDiv">
|
1195
|
+
<select class="inputField" id="idealIssuerId" name="idealIssuerId">
|
1196
|
+
<option value="0">Kies uw bank...</option>
|
1197
|
+
<option value="1121">Test Issuer</option>
|
1198
|
+
|
1199
|
+
<option value="1151">Test Issuer 2</option>
|
1200
|
+
<option value="1152">Test Issuer 3</option>
|
1201
|
+
<option value="1153">Test Issuer 4</option>
|
1202
|
+
<option value="1154">Test Issuer 5</option>
|
1203
|
+
<option value="1155">Test Issuer 6</option>
|
1204
|
+
<option value="1156">Test Issuer 7</option>
|
1205
|
+
|
1206
|
+
<option value="1157">Test Issuer 8</option>
|
1207
|
+
<option value="1158">Test Issuer 9</option>
|
1208
|
+
<option value="1159">Test Issuer 10</option>
|
1209
|
+
<option value="0">---Overige banken---</option>
|
1210
|
+
<option value="1160">Test Issuer Refused</option>
|
1211
|
+
<option value="1161">Test Issuer Pending</option>
|
1212
|
+
|
1213
|
+
<option value="1162">Test Issuer Cancelled</option>
|
1214
|
+
</select>
|
1215
|
+
</div></td>
|
1216
|
+
</tr>
|
1217
|
+
<tr>
|
1218
|
+
<td colspan="2"><div class="r">
|
1219
|
+
<input class="paySubmit paySubmitideal" type="submit" name="pay" value="continue" />
|
1220
|
+
</div></td>
|
1221
|
+
</tr>
|
1222
|
+
|
1223
|
+
</table>
|
1224
|
+
<script type="text/javascript">
|
1225
|
+
var collapseideal = new animatedcollapse("pmmdetails-ideal", 1000, false, false, config["pmmanimation"]==1?false:true);
|
1226
|
+
details.push(collapseideal);
|
1227
|
+
|
1228
|
+
displayAmountExtras['ideal'] = "";
|
1229
|
+
|
1230
|
+
|
1231
|
+
|
1232
|
+
|
1233
|
+
if (notNull(document.getElementById('pmmform-ideal'))) {
|
1234
|
+
document.getElementById('pmmform-ideal').setAttribute("autocomplete","off");
|
1235
|
+
}
|
1236
|
+
</script>
|
1237
|
+
</div>
|
1238
|
+
</li>
|
571
1239
|
</ul>
|
572
1240
|
|
573
1241
|
<div id="errorFrame" style="display: none;" class="popupMsg errorFrame">
|
@@ -38,7 +38,14 @@ module Adyen
|
|
38
38
|
end
|
39
39
|
end
|
40
40
|
end
|
41
|
-
|
41
|
+
|
42
|
+
class Redirector
|
43
|
+
def call(env)
|
44
|
+
[302, {"Location" => "https://test.adyen.com#{env["REQUEST_PATH"]}"}, self]
|
45
|
+
end
|
46
|
+
def each(&block); end
|
47
|
+
end
|
48
|
+
|
42
49
|
class Server
|
43
50
|
|
44
51
|
class << self
|
@@ -53,13 +60,15 @@ module Adyen
|
|
53
60
|
use Rack::CommonLogger if config[:log]
|
54
61
|
use Rack::Head
|
55
62
|
|
56
|
-
# TODO: process Adyen default files at "/hpp"
|
57
63
|
map("/sf/#{File.basename(config[:skins_directory])}") do
|
58
64
|
run Rack::Cascade.new([
|
59
65
|
Rack::File.new(config[:skins_directory]),
|
60
66
|
Rack::File.new(File.join(File.dirname(config[:skins_directory]), 'base'))
|
61
67
|
])
|
62
68
|
end
|
69
|
+
|
70
|
+
# Redirect requests for default assets to Adyen:
|
71
|
+
map("/hpp") { run Adyen::SkinBuilder::Redirector.new }
|
63
72
|
|
64
73
|
map('/') { run Adyen::SkinBuilder::SkeletonAdapter.new(config[:skins_directory]) }
|
65
74
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adyen-skinbuilder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 4
|
10
|
+
version: 0.2.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Priit Haamer
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-07-01 00:00:00 +03:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|