File tree Expand file tree Collapse file tree 3 files changed +15
-6
lines changed Expand file tree Collapse file tree 3 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -206,13 +206,21 @@ private function getDisallowedFunding()
206
206
}
207
207
208
208
/**
209
- * Returns allowed funding from configuration
209
+ * Returns allowed funding from configuration after validating
210
210
*
211
211
* @return string
212
212
*/
213
213
private function getAllowedFunding ()
214
214
{
215
- return implode (', ' , $ this ->supportedPaymentMethods );
215
+ $ payLaterActive = (boolean )$ this ->config ->getPayLaterConfigValue ('experience_active ' );
216
+
217
+ // If Pay Later is enabled, then only paylater parameter will go in enable-funding parameter list
218
+ if ($ payLaterActive == false ) {
219
+ unset($ this ->supportedPaymentMethods ['paylater ' ]);
220
+ return implode (', ' , $ this ->supportedPaymentMethods );
221
+ } else {
222
+ return implode (', ' , $ this ->supportedPaymentMethods );
223
+ }
216
224
}
217
225
218
226
/**
Original file line number Diff line number Diff line change 247
247
<group id =" express_checkout_required" >
248
248
<field id =" enable_express_checkout_bml" showInDefault =" 0" showInWebsite =" 0" />
249
249
<field id =" express_checkout_bml_sort_order" showInDefault =" 0" showInWebsite =" 0" />
250
- <field id =" enable_paypal_paylater_experience" showInDefault =" 0 " showInWebsite =" 0 " />
250
+ <field id =" enable_paypal_paylater_experience" showInDefault =" 1 " showInWebsite =" 1 " />
251
251
<group id =" advertise_bml" showInDefault =" 0" showInWebsite =" 0" />
252
- <group id =" advertise_paylater" showInDefault =" 0 " showInWebsite =" 0 " />
252
+ <group id =" advertise_paylater" showInDefault =" 1 " showInWebsite =" 1 " />
253
253
</group >
254
254
</group >
255
255
<group id =" paypal_group_all_in_one" translate =" label comment" sortOrder =" 7" showInDefault =" 1" showInWebsite =" 1" showInStore =" 1" >
279
279
</field >
280
280
<field id =" enable_express_checkout_bml" showInDefault =" 0" showInWebsite =" 0" />
281
281
<field id =" express_checkout_bml_sort_order" showInDefault =" 0" showInWebsite =" 0" />
282
- <field id =" enable_paypal_paylater_experience" showInDefault =" 0 " showInWebsite =" 0 " />
282
+ <field id =" enable_paypal_paylater_experience" showInDefault =" 1 " showInWebsite =" 1 " />
283
283
<group id =" advertise_bml" showInDefault =" 0" showInWebsite =" 0" />
284
- <group id =" advertise_paylater" showInDefault =" 0 " showInWebsite =" 0 " />
284
+ <group id =" advertise_paylater" showInDefault =" 1 " showInWebsite =" 1 " />
285
285
</group >
286
286
<group id =" settings_ec" >
287
287
<label >Basic Settings - PayPal Website Payments Standard</label >
Original file line number Diff line number Diff line change 187
187
</argument >
188
188
<argument name =" supportedPaymentMethods" xsi : type =" array" >
189
189
<item name =" venmo" xsi : type =" string" >venmo</item >
190
+ <item name =" paylater" xsi : type =" string" >paylater</item >
190
191
</argument >
191
192
<argument name =" localeResolver" xsi : type =" object" >Magento\Paypal\Model\Express\LocaleResolver</argument >
192
193
</arguments >
You can’t perform that action at this time.
0 commit comments