When Paytrail payment service has been integrated using either REST interface or form interface, the payment process can be shortened and made easier from the customer's point of view by implementing payment method selection embedding. In this case the payment methods are available directly at the end of a webshop's order process instead of having to move first to Paytrail service to select the payment method.
initWithToken(string elementId, string token, object options)
Example 4.13. Payment method selection page embedding with JSON interface
initWithForm(string formId, object options)
Example 4.14. Payment method selection page embedding with form interface
The last parameter of initWithToken and initWithForm is an object named
object can be used to customise the design and functionality of the payment method selection widget.
All parameters of the options structure are optional and their default values are presented in parenthesis.
The payment method selection page embedding supports the following localisations: fi_FI (Finnish), en_US (English), da_DK (Danish), de_DE (German), et_EE (Estonian), fr_FR (French), ru_RU (Russian) and sv_SE (Swedish). The traditional payment method selection page supports fi_FI (Finnish), en_US (English) and sv_SE (Swedish).