iDEAL
Integrate iDEAL using our Web SDK.
Ideal is an online payment method that enables consumers to pay through their own bank. To enable IDEAL for your account, please contact customer support to set this up.
Make sure you have implemented the following prerequisites from the Web SDK integration guide:
The fields referred to in this step are part of the iFrame configuration object supplied in the: createCardDetails() (Step Two in the Prerequisites) . Call: judo.createCardDetails('payment-iFrame', iFrameConfiguration)
To add the iDEAL payment tab:
- Ensure the array set for the enabledPaymentMethods field includes ‘IDEAL’.
- For example: enabledPaymentMethods: ['CARD', 'IDEAL']
You can alter the timeout for iDEAL transactions by setting the field idealPollingTimeout. Set it as the number of ms you want the timeout to be. For example: idealPollingTimeout: 40000 would set the transaction timeout to 40000ms (40 seconds).
If the field is not provided, the default value is 60000ms
- Define the idealConfiguration object for the payment
Ensure the details used when creating the paymentSession match the values set in the following configuration:
To successfully process an iDEAL transaction, the currency must be ‘EUR’ (Euros).
2. Call getPaymentMethod() in your function that handles the payment button click for card payments. (If this is not already set up, add a function to handle this). getPaymentMethod() returns information on which tab is open in the iFrame. Call the appropriate Web SDK method to trigger the correct transaction.
For example:
- If the card form tab is open, getPaymentMethod will return “CARD”.
- For a payment, call: invokePayment()
- For a preAuth, call: invokePreauth()
- If the iDEAL tab is open, getPaymentMethod will return “IDEAL”.
- Call: invokePaymentWithIDEAL()
If you do not already have an event handler on your payment button to invoke the handlePaymentButtonClick():
- Add the onclick attribute to your payment button: <button id="submit-payment-button" onclick="handlePaymentButtonClick()"> Pay Now </button>
Make sure you have set :id ="submit-payment-button". This is required to perform form validation, where the Pay button will be greyed out until all the information has been entered.