5. Add a payment button
Finally, a payment button must be added. This button must call the appropriate payment method initialization method:
Method | Description |
---|---|
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. |
epay.createGooglePayTransaction() | Initializes and begins processing of a GooglePay based payment. |
epay.createAnydayTransaction() | Initializes and begins processing of a Anyday based payment. |
epay.createViabillTransaction() | Initializes and begins processing of a Viabill based payment. |
epay.createSwishTransaction() | Initializes and begins processing of a Swish 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