(element)
| 3 | |
| 4 | export class PaymentMethod extends SelectionMethod{ |
| 5 | constructor(element){ |
| 6 | if(!element.dataset.selectGateway) |
| 7 | throw new NotValidFieldException(); |
| 8 | |
| 9 | super(element); |
| 10 | Object.setPrototypeOf(this, PaymentMethod.prototype); |
| 11 | |
| 12 | this.type = 'payment'; |
| 13 | this.addEventListener('change', () => { |
| 14 | let event = new CustomEvent(`checkout:paymentmethod:changed`, { detail: this }); |
| 15 | document.dispatchEvent(event); |
| 16 | }); |
| 17 | } |
| 18 | |
| 19 | addDescription(text){ |
| 20 | let desc = this.nextElementSibling.querySelector('.blank-slate'); |
nothing calls this directly
no outgoing calls
no test coverage detected