Skip to main content

5. Add a payment button

Finally, a payment button must be added. This button must call the appropriate payment method initialization method:

MethodDescription
epay.createCardTransaction()Initializes and begins processing of a card (hosted-fields) based payment.
epay.createVippsMobilePayTransaction()Initializes and begins processing of a Vipps-MobilePay based payment.
epay.createApplePayTransaction()Initializes and begins processing of a ApplePay based payment.
<button
type="button"
onclick="epay.createCardTransaction()"
>
PAY
</button>

As the payment is processing JavaScript events will be notified to the function described in the JavaScript events section

Example ApplePay button