Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
6
Erster Beitrag:
vor 8 Monaten, 1 Woche
Letzter Beitrag:
vor 8 Monaten, 1 Woche
Beteiligte Autoren:
Luis Antonio Gutiérrez Flores, M-K, Fabrice Harari, cardcoder

[WB 20] Controlling click in html control

Startbeitrag von Luis Antonio Gutiérrez Flores am 08.02.2017 23:00

Good afternoon I'm working with a payment API but got stuck. First I send a Form with all the parameters needed, then I retrieve the result with HTTPGetResult and assign the result to a HTML control, this shows some inputs, combos, and a "Pay" button, that "Pay" button is supposed to go to a server, do some validations and then open a PopUp in my page, but it does nothing, the documentation doesn't explain much. One of the parameters sent in the form is the URL where the response from the server is going to be send, but I don't know how to retrieve this response.

Antworten:

Hi Luis,

you didn't tell us WHICH payment api you are using, but generally, things are NOT done the way you are currently working.


This is how things are done:
- You DON'T send a form and gethttpresult
- instead you do a scriptexecute of the URL in question (the one you are using for the form)
- this open the payment site in STEAD of your site
- the user then clicks on all buttons and such, directly on the payment site
- once the payment is done, the payment site offers to the user to return to your site (and you have given the payment site the URL to use for that)
- the payment info (done, not done, etc) is sent directly to your site (the payment site calls another URL that you gave them, with parameters that you have to analyse)...

Best regards

von Fabrice Harari - am 09.02.2017 12:03
Thanks for the observations Fabrice I'll try it the way you are explaining it, the API I'm using is called Payworks 3D-Secure. Another question, if my page is a dynamic webdev page which address do I give it to return the values to?

von Luis Antonio Gutiérrez Flores - am 09.02.2017 15:11
Hi Luis,

Fabrice is EXACTLY right.

I have done this with Paypal, Sagepay and Worldpay.

I have previously posted on how to do this on a WB17/WB21 php site. If you look for Paypal you should find it.

Create a html control (which includes the click button and all parameters required by the payment processor)

Create 2 pages for 1. successful/ 2. fail (depending on the actions on the payment page will depend on where the user is sent back to - you will be required to add these pages to the payment site when you setup the account).

This should do everything that you require.

Kindest Regards,

Mike

von cardcoder - am 09.02.2017 16:06
Either you define an AWP page in your dynamic project that can handle the response for you and use the address to the AWP page, or you let the payment provider connect to your dynamic website (the same way users connect to it) and handle the parameters in the project initialization and redirect to the right dynamic page from there

von M-K - am 09.02.2017 16:14
Thanks for your replies, followed the instructions Fabrice gave me and yes it is working! Now about the returned values, I think I'll create an AWP page that handles the values and redirects to my dynamic page, but I got another question, how can I retrieve the response after finishing the payment? In the API documentation the return values are listed, so maybe in the AWP page where I'll receive the response I'll need to do for example:

sCONTROL_NUMBER = PageParameter("CONTROL_NUMBER")

This is one of the names of the return variables listed in the documentation

von Luis Antonio Gutiérrez Flores - am 09.02.2017 16:34
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.