Has anyone ever worked with stripe payment integration in the outsystems?
I am working on integrating it in my project as: I would make a customer enter their credit card info into stripe checkout(https://stripe.com/docs/checkout), the token that this checkout will return, I will use that to create a customer(https://stripe.com/docs/api/curl#create_customer) and then create a plan (https://stripe.com/docs/api/java#plans), and then create a subscription for a customer to the plan created earlier (https://stripe.com/docs/api/java#subscriptions).
But I am stuck on the very first step of storing the customer's credit card information, as I want to implement stripe checkout for customer to enter their credit card to prevent PCI Compliance issues and in the code for generating the payment button, first issue is that is it even allowed to create a form using an expression with following code:
<form action="/your-server-side-code" method="POST">
and if yes, what would I give in value for action? I've implemented this before in .Net MVC application and there I gave it value of @url.action("checkout") and here it went to my 'checkout' controller action method, but how would I do something like this in Outsystems(Java stack)?
The second option looks better fitted for an OutSystems application.As for how to get the token back to your server side, a cleaner alternative to use the hidden button is to use a block from RichWidgets called FakeNotifyWidget. See the block description on how to use it.
I've implemented the button with second option, but I am little confused about how would I access the Id of FakeNotifyWidget from the Page level javascrip and call NotifyWidgetGetMessage() action from there. Can you please look at the attached oml and help me with that?
(btw; remember that to access the .Id of a widget you need to give it a name)
I've implemented it the way you said, can you please have a look at the attached oml to check if I am doing it right?
It looks good.
Just a minor point that I recommend as good practice (in this particular case it doen't make a difference).
When referencing widgets in a script try to place the script after the correspondent widget. In your case doesn't make a difference because FakeNotifyWidget is only called later on the callback.