I've been setting up an alternate payment setup vary similar to the purchase order payment setup that is outlined in this thread (https://forum.foxycart.com/discussion/9492/use-purchase-order-option-to-process-certain-payments-offline
) and ran into a snag.
After some testing I've figured out that setting "FC.json.show_paypal_express_payment_option" to true will enable the Paypal payment input that is marked as depreciated in the admin/payments settings and similarly, enabling the Paypal express admin payment setting will populate the FC.json.hosted_payment_gateways array with a payment object that will render a different Paypal payment input when the template renders.
So, using that snippet as provided from the thread *and* enabling the non-depreciated Paypal express option results in two Paypal inputs rendering, one of which doesn't work. That was confusing for a while but I figured out why and how that is all happening and it makes sense now.
My question now is... is there a better way to control the creation of that payment object in the hosted_payment_gateways array or is my best option for enabling and disabling the rendering of the Paypal express input block to just manually remove/re-add the object to the array and re-render?
Or, is it better to use the depreciated Paypal setup and continue setting FC.json.show_paypal_express_payment_option to true/false as needed?