Jump to content

Commerce: Custom block in manual payment method?


Go to solution Solved by Jim M,

Recommended Posts

Posted (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 by Fernando Mercês
Posted (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 by Fernando Mercês
Posted

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.

Posted (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?

Could contain: Text, Number, Symbol, Computer Hardware, Electronics, Hardware, Monitor, Screen

 

Edited by Fernando Mercês
Posted (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 by Fernando Mercês
  • Solution
Posted

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...