Commit f2eeb8e 1 parent d94e1cf commit f2eeb8e Copy full SHA for f2eeb8e
File tree 1 file changed +5
-3
lines changed
src/components/easycredit-widget
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -205,14 +205,16 @@ export class EasycreditWidget {
205
205
const info = state . webshopInfo
206
206
paymentType = this . amount >= info . minInstallmentValue && this . amount <= info . maxInstallmentValue ? METHODS . INSTALLMENT : METHODS . BILL ;
207
207
}
208
- if ( this . isEnabled ( paymentType ) ) {
209
- url . searchParams . append ( ' paymentType' , paymentType + '_PAYMENT' ) ;
208
+ if ( ! this . isEnabled ( paymentType ) ) {
209
+ paymentType = paymentType === METHODS . INSTALLMENT ? METHODS . BILL : METHODS . INSTALLMENT ;
210
210
}
211
+
212
+ url . searchParams . append ( 'paymentType' , paymentType + '_PAYMENT' ) ;
213
+
211
214
return url . origin + url . pathname + url . hash + url . search ;
212
215
}
213
216
214
217
getModalFragment ( ) {
215
- //const url = this.getInstallmentPlan()?.url ?? this.getDefaultModalUrl()
216
218
return ( [
217
219
< easycredit-modal ref = { ( el ) => this . modal = el as HTMLEasycreditModalElement } size = "payment" >
218
220
< iframe slot = "content" > </ iframe >
You can’t perform that action at this time.
0 commit comments