We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6910
    • 1 Posts
    Working on integrating a form with a payment gateway for simple membership payment, this spans 3 pages.

    Page 1: Order form, personal details, credit card information
    Formit call validates the form input, there is a hook that takes the credit card number and creates a new placeholder with a masked cc number, &store is set to 1
    It get’s redirected to the review page.

    Page 2: Review your order, and all payment info in hidden form field, this is my first page to have the `FormItRetriever`

    On submission, this uses a seperate modified version of the FormIt snippet, it’ve added in a few extra lines of code to submit the credit card information to the payment gateway and wait for the the response.
    Anyone familiar with the formit source code - i’ve stuck it in just after

    $fields = $fi->postHooks->fields;


    When the response comes back from the payment gateway, i parse it for the authorisation code if it was successful - now my intention is pass that to the final results page.
    I was able to add that to the $fields array, as this is what is stored when &store=`1`.....
    you are now redirected to the results page.

    Page 3: Results page. This page also has a FormItRetriever call..
    Problem being when i arrive on this page, it’s blank, nothing is displayed.
    there are no errors and nothing in the logs to indicate a problem.
    It i delete the FormItRetriever call, when i get redirected to the page, the template loads, but my results message is no displayed as this is tied up placeholder from the previous page

    Is there any reason why 2 consecutive redirects to page with a FormItRetriever call in both would result in the 2 one not doing anything...?
    or is there anybetter way of passing my autorisation message from my modified formit snippet to the redirected page

    [solved] turns out the response i was getting from the gateway contained square braces ([ ]’s) which was sending the retriever into a shit-fit.
    all fixed.
      • 6910
      • 1 Posts
      forgot to say using formit 1.7.0 and revo 2.1.0 pl