Reply
Highlighted
Member
Posts: 2
Registered: ‎10-19-2017

Enable/Disable credit card/eCheck payment options dynamically in Accept hosted payment page

Hi All,

 

Currently I'm in a process of migrating from SIM API to Accept Hosted becase of the SIM API depcrication.

 

Since I'm developing this for a product, some times I want to prevent users from paying from Credit card, sometimes from eCheck, and in some scenarios I want to prevent them paying by some card types (ex: VISA/AMEX). Is it possible to do this?

 

I couldn't find any document related to this. Earlier we could pass type of the transction to the API (like echeck). Then it will dissable the relevent payment option in payment form. (User can't pay using a credit card.)

 

Is there any way to achieve this in new Accept Hosted payment page? Currently it has both the options available for payments.

Highlighted
All Star
Posts: 699
Registered: ‎11-03-2016

Re: Enable/Disable credit card/eCheck payment options dynamically in Accept hosted payment page

Hi @Sandun

 

While we haven't yet updated the Accept Hosted documentation to reflect this, we've just barely updated Accept Hosted to support exactly what you're describing.

 

In the hostedPaymentPaymentOptions setting, you now can pass two additional Boolean parameters. showBankAccount andshowCreditCard can be sent to direct which payment types to make available on the form. The default parameters for both if they are not sent is "true".

 

The documentation should be updated to reflect this within the next couple of weeks.