vindiciaAuthId: | object | Required. This option is for your login. We use it for “Basic Authentication” vindiciaAuthId: "aXdjbF9vbmVfdGltZV9sb2dpbjpBTG5JWnRjZA==", // Authorization: Basic header" |
vindiciaServer: | object | Required. This option specifies the location of vindicia REST server to create the payment method on. If not provided it will default to “api.vindicia.com” our production server. vindiciaServer: "api.vindicia.com", |
vindiciaRestServer: | object | Required. This option specifies the location of vindicia REST server to create the payment method on. If not provided it will default to “api.vindicia.com” our production server. vindiciaServer: "api.vindicia.com", |
| useCardinal3ds: | boolean | Optional3DS is the Strong Customer Authentication payment standard for the European Economic Area. If you are using Cardinal Commerce 3DS, set this boolean to true. Default is false. |
| useCardinalStaging: | boolean | Optional This option is relevant only if the useCardinal3ds option is set to True. Set this to true if you are using the Cardinal Commerce Staging environment. If you are using the Cardinal Commerce Production environment leave as false. Default is false. |
hostedFields: | object | Required. This option has many subobjects, one for each input field that you want protected and a “styles” sub object. Not all input fields need to be protected. hostedFields: { cardnumber: { selector: "#vin_credit_card_account", // required placeholder: "Enter Credit Card Number" // optional field }, expirationDate: { selector: "#vin_credit_card_expiration_date", // required placeholder: "Expiration Date MM/YY", // optional field format: "MM/YY" // optional, defaults to MM/YY }, cvn: { selector: "#vin_credit_card_cvn", placeholder: "Enter CVV" // optional field }, styles: { "input": { "width": "100%", "font-family": "'Helvetica Neue',Helvetica,Arial,sans-serif", "font-size": "14px" } } }, Or if you want the month and year separated but still show as input boxes: hostedFields: { cardnumber: { selector: "#vin_credit_card_account", // required placeholder: "Enter Credit Card Number" // optional field }, expirationMonthInput: { selector: "#vin_credit_card_expiration_month", placeholder: 'Month', format: "MM" // only "MM" is supported }, expirationYearInput: { selector: "#vin_credit_card_expiration_year", placeholder: 'Year', format: "YYYY" // "YY" or "YYYY", defaults to YYYY }, cvn: { selector: "#vin_credit_card_cvn", placeholder: "Enter CVV" // optional field Or if you want month and year as dropdown boxes: hostedFields: { cardnumber: { selector: "#vin_credit_card_account", // required placeholder: "Enter Credit Card Number" // optional field }, expirationMonth: { // optional dropdown field or use expirationDate selector: "#vin_credit_card_expiration_month", format: "N - A" // "N", "A", "N A", "N-A", "N - A" where (N=numeric month, A=Alphabetic Month) }, expirationYear: { selector: "#vin_credit_card_expiration_year"format: "YYYY" // "YY" or "YYYY", defaults to YYYY }, cvn: { selector: "#vin_credit_card_cvn", placeholder: "Enter CVV" // optional field}, styles: { "input": { "width": "100%", "font-family": "'Helvetica Neue',Helvetica,Arial,sans-serif", "font-size": "14px" } }}, Multi-language support for month and year dropdown boxes: hostedFields: { cardNumber: { // required selector: "#vin_credit_card_account", placeholder: "Entrez le numéro de carte de crédit" // optional field }, expirationMonth: { // optional dropdown field or use expiration_date selector: "#vin_credit_card_expiration_month", language: "fr", // en, es, de, pt, fr, zh, ja only allowed format: "N - A" // "N", "A", "N A", "N-A", "N - A" where (N=numeric month, A=Alphabetic Month) }, expirationYear: { // optional dropdown field or use expiration_date selector: "#vin_credit_card_expiration_year", language: "fr", // en, es, de, pt, fr, zh, ja only allowed format: "YYYY" // or "YYYY", defaults to YYYY }, cvn: { selector: "#vin_credit_card_cvn", placeholder: "Entrez CVV" // optional field }, styles: { "input": { "width": "100%", "font-family": "'Helvetica Neue',Helvetica,Arial,sans-serif", "font-size": "14px" } } }, |
iframeHeightPadding: | Optional, integer | During vindicia.setup() the iframe height is adjusted to be the size of the input field inside of it. If any styles require some extra padding around the input box, this is the way to get that. It defaults to zero. iframeHeightPadding: 3, |
onSubmitEvent: | Optional, function | This is where you will define a function to be executed when the submit button is pressed. It can be anonymous or a call to an existing function. onSubmitEvent: function(myform) { return merchantValidate(myform); }, |
onSubmitCompleteEvent: | Optional, function | Us this callback function when the REST server successfully creates a payment method. Status returned is 200. onSubmitCompleteEvent: function(data) { $('#message').html('submitted OK'); return true; }, |
onSubmitCompleteFailedEvent: | Optional, function | This is where you will define a function to be executed when the submit to the REST server fails. It can be anonymous or a call to an existing function. The most common reasons for failure are:- OneTimeLogin token is being reused and rejected - The vin_id specified in the form is already in our system and cannot be reused onSubmitEvent: function(myform) { return merchantValidate(myform); }, |
onVindiciaFieldEvent: | Optional, function | To have access to real time validation of iframe blur events, use this optional handler onVindiciaFieldEvent: function(event) { // optional if (event.detail.fieldType == 'expirationDate') { if (!event.detail.isValid) { console.log('vindiciaEvent expirationDate not valid'); } } |
| The following properties are supported in hosted fields: | | |
cardNumber | | A required field. cardNumber: { selector: "#vin_credit_card_account", placeholder: "Enter Credit Card Number" // optional field }, |
expirationDate | | A required field unless you use the optional fields below for separating the month and year as dropdowns or input boxes.Supported formats include the following: - MM/YY’ (the default) - ‘MM-YY’ - ‘MMYY - YY/MM” - ‘YY-MM’ - ‘YYMM’ - ‘YYYY/MM’ - ‘YYYY-MM’ - ‘YYYYMM’ - ‘MM/YYYY’ - ‘MM-YYYY’ - ‘MMYYYY’ expirationDate: { selector: "#vin_credit_card_expiration_date", placeholder: "Expiration Date MM/YY", // optional field format: "MM/YY" // defaults to MM/YY }, |
cvn | | cvn: { selector: "#vin_credit_card_cvn", placeholder: "Enter CVV" // optional field }, |
expirationMonth | | Optional field to show a dropdown box for the month. expirationMonth: { selector: "#vin_credit_card_expiration_month", language: "fr", // en, es, de, fr, ja, pt, zh only allowed format: "N - A" // "N", "A", "N A", "N-A", "N - A" where (N=numeric month, A=Alphabetic Month) }, The language is optional and defaults to “en” English. All the month names will display in the chosen language. Currently only en (English),es (Spanish), de (German), fr, (French),ja (Japanese), pt (Portuguese), zh (Chinese) are supported . |
expirationYear | | Optional field to show a dropdown box for the year. expirationYear: { selector: "#vin_credit_card_expiration_year", language: "fr", // en, es, de, fr, ja, pt, zh only allowed format: "YYYY" // or "YYYY", defaults to YYYY }, The language is optional and defaults to “en” English. All the month names will display in the chosen language. Currently only en (English), es (Spanish), de (German), fr , (French), ja (Japanese), pt (Portuguese), zh (Chinese) are supported. |
expirationMonthInput | | Optional field to show an input box for the month. expirationMonthInput: { selector: "#vin_credit_card_expiration_month", placeholder: 'Month', format: "MM" // only "MM" is supported } |
expirationYearInput | | Optional field to show an input box for the year. expirationYearInput: { selector: "#vin_credit_card_expiration_year", placeholder: 'Year', format: "YYYY" // "YY" or "YYYY", defaults to YYYY }, |
| Notes on some parameters | | |
autocomplete | | An optional parameter describing the following fields for cardNumber, expirationDate, cvn. cardNumber: { selector: "#vin_credit_card_account", autocomplete: "cc-number"},expirationDate: { selector: "#vin_credit_card_expiration_date", // required autocomplete: "cc-exp" // optional field },cvn: { selector: "#vin_credit_card_cvn", autocomplete: ‘"cc-csc" // optional field}, Set this parameter to off or cc-number. When you set it to cc-number you take advantage of the Chrome Autofill feature. If you store credit cards in your browser, this feature will assist the user when entering the stored credit card number. |
formatinput | | An optional parameter describing the following fields for cardNumber or expirationDate. cardNumber: { selector: "#vin_credit_card_account", formatinput: true // optional field, force spacing }, expirationDate: { selector: "#vin_credit_card_expiration_date", // required format: "MM/YYYY", // optional, defaults to MM/YY formatinput: true // optional field, force slash in proper location }, This parameter can be either true or false. If you set it to true, the browser will add spaces, slashes or dashes when the numbers are typed in. This makes for fewer mistakes and is easier to read. For expirationDate, above, a slash is automatically inserted when the user types the third number—if the user did not type a slash. |
maskinput | | An optional parameter describing the following fields for cardNumber or cvn. cardNumber: { selector: "#vin_credit_card_account", maskinput: false // optional password like field }, expirationDate: { selector: "#vin_credit_card_expiration_date", // required maskinput: false // optional password like field }, This parameter can be true or false. Set it to true to have the browser show asterisks (as in a password field) as the user types. |