KR.throwCustomError()
KR.throwCustomError() allows you to customize errors.
The method expects the following parameters:
- The custom error message.
- The used payment method (link: the table of payment methods.)
await KR.throwCustomError('msg', 'paymentMethod');
Example of integration
Example for card payment
<script type="text/javascript">
(...)
await KR.throwCustomError('Custom error for the cards', 'CARDS');
(...)
</script>