Fernando Mercês Posted April 5, 2023 Posted April 5, 2023 (edited) Hi all, I'd like to use a custom payment gateway that's neither Stripe or PayPal. Commerce allows me to create a Manual new payment method, but it gives me a WYSIWYG editor to write whatever I want, however I'd need to embed some HTML code from my payment gateway of choice. Is there a way to do it? Custom blocks maybe? Thanks! Edited April 5, 2023 by Fernando Mercês
opentype Posted April 5, 2023 Posted April 5, 2023 The “Manual” option is not meant for a payment gateway. It’s meant for a manual payment by the customer. The shop owner would (for example) put their bank account details in that editor field and then the customer pays using that option. Fernando Mercês 1
Fernando Mercês Posted April 5, 2023 Author Posted April 5, 2023 (edited) Thanks, @opentype. No way to show custom code at the checkout then, right? Can you think of alternatives to use an unsupported payment method? I mean, most of payment gateways offer some HTML code for to show a custom button in our websites, but it seems I don't have this option with Invision. 😞 Edited April 5, 2023 by Fernando Mercês
Jim M Posted April 5, 2023 Posted April 5, 2023 You can certainly paste in HTML there if your group has the ability to do so, there is nothing stopping you. Just keep in mind that it won't interact with Commerce so you would still need to manually manage it.
Fernando Mercês Posted April 5, 2023 Author Posted April 5, 2023 (edited) Thanks, @Jim M. There's clearly something I am missing then. It wouldn't be just paste, right? I mean, the example below shows exactly what I typed in the checkout page. How do I set it to render HTML? Edited April 5, 2023 by Fernando Mercês
Fernando Mercês Posted April 5, 2023 Author Posted April 5, 2023 (edited) Oh, I think I now what you mean by "paste in HTML": you're basically saying I can copy rendered HTML text and paste in this field as rich text, right? But what I need is the ability to render HTML. For example, PayPal provides us with HTML code like these to show a "Buy now" button: <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <!-- Identify your business so that you can collect the payments. --> <input type="hidden" name="business" value="herschelgomez@xyzzyu.com"> <!-- Specify a Buy Now button. --> <input type="hidden" name="cmd" value="_xclick"> <!-- Specify details about the item that buyers will purchase. --> <input type="hidden" name="item_name" value="Hot Sauce-12oz. Bottle"> <input type="hidden" name="amount" value="5.95"> <input type="hidden" name="currency_code" value="USD"> <!-- Display the payment button. --> <input type="image" name="submit" border="0" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif" alt="Buy Now"> <img alt="" border="0" width="1" height="1" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" > </form> Is there a way I could use something like this in Invision? I know I can create a custom block but I'd have to be able to use it in commerce checkout. Thanks. Edited April 5, 2023 by Fernando Mercês
Solution Jim M Posted April 5, 2023 Solution Posted April 5, 2023 You would need to give your administrator group the ability to post HTML in the editor by going to ACP -> Members -> Groups -> edit group -> Can post HTML? You Then will see a Source button in the top left of the editor. Please note: do not give this permission to anyone other than your staff which you absolutely trust as malicious things can be done with this. Fernando Mercês 1
Fernando Mercês Posted April 5, 2023 Author Posted April 5, 2023 (edited) OMG years with Invision and I didn't know about this feature. Thanks a lot, @Jim M! Edited April 5, 2023 by Fernando Mercês
Recommended Posts