Announcement

Collapse
No announcement yet.

What exactly is the server returning with a form method=post

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • What exactly is the server returning with a form method=post

    What does the server return when using the Postback ? XML? JSON? HTML? Is it just as if the form's action posted the values to our own server?

    I would really like to direct the Declined page and error page back to the form with an alert to the error or that the transaction was declined, so that my users have the easiest way to correct their data and move forward.

    But I'm at a loss as how to collect that data and populate the form with what the user has already entered.

  • #2
    Good day!

    There are 2 methods that you can use to post: http://manual.clickandpledge.com/For....html#Postback
    1. Get
    2. Post

    By default the forms processor uses the GET method and posts the response to the URL. If you read the URL you can see the server response as authorized, declined, as well as the VaultGUID and order number.

    If you use the POST method then every field posted to us will be posted back to you EXCEPT The credit card number. So in your form you can use the method to read the form response and show the form fields as posted by the donor.

    Hope the above helps with what you wish to accomplish.

    PLEASE NOTE:

    Your form is using the FaaS processor. If you were using the complete API using the Soap service the response will be an XML post back.
    Regards,
    Click & Pledge Support Department

    On Salesforce? Help us by rating our app: Click & Pledge Donor Management on AppExchange

    Join us @ the educational webinars: https://clickandpledge.com/webinars/
    Live Support available Join between 3:00 - 3:30 p.m. ET Monday - Thursday: https://clickandpledge.com/webinars/
    Are you on Salesforce? Join us at the Power of Us Hub: https://powerofus.force.com/0F980000000CjpC

    Comment


    • #3
      still unclear
      Your form is using the FaaS processor. If you were using the complete API using the Soap service the response will be an XML post back.

      I add: <input type="hidden" name="Postback" id="Postback" value="get" /> to the form, and I get the error code in the returned URL. In order to populate the values the user entered, I presume I need to change that value to "post"

      But changing this doesn't automatically populate the fields of the form, so I presume that I need code to assign those fields to variables in the header and then do some sort of response.write-like thing in the body of the form to populate it. It's a linux server, and my experience is some basic asp, not php . So I try to find some php code that I can paste. Nothing works, so I post in a forum about a simple way to collect postback information from a 3rd party server sending it back.

      and their question is "What does the 3rd party server return? XML? JSON? HTML?"

      so I need an answer to progress.

      When you say I'm using the FaaS processor, and if I was using the API it would be XML- I don't know if you're suggesting that the FaaS processor is returning XML, or that there is a different environment I COULD be using that postback is XML

      what do I tell them?

      Comment


      • #4
        Good day!

        The method to get all posted information back is POST so you are right.

        If you are using ASP then you need to have a page that reads the post back.

        FirstName = Request.Form("FirstName")

        Using the above the variable FirstName will have the value the user entered and the value that was posted to our API.

        Knowing the FirstName you can set it as the default value for the field so the form field shows the FirstName for review.

        You are using FaaS since the form is being posted to: https://FaaS.Cloud.ClickandPledge.com

        You should not worry about anything. Don't worry about XML or SOAP or anything - that is a higher level geekness and not for everyone. You are using the forms and the form processor and all is fine. Just simply change the method for posting to POST and read back what we post back to you for Error, etc.

        You may want to check: http://www.w3schools.com/asp/asp_inputforms.asp

        Read about the Request.Form method.

        Hope that helps.
        Regards,
        Click & Pledge Support Department

        On Salesforce? Help us by rating our app: Click & Pledge Donor Management on AppExchange

        Join us @ the educational webinars: https://clickandpledge.com/webinars/
        Live Support available Join between 3:00 - 3:30 p.m. ET Monday - Thursday: https://clickandpledge.com/webinars/
        Are you on Salesforce? Join us at the Power of Us Hub: https://powerofus.force.com/0F980000000CjpC

        Comment


        • #5
          resolved

          Actually, I couldn't use asp because the server we have the SSL on is a Linux server (used to host a 3rd party app).

          I was trying to explain that I understand the concept of collecting data from a post in an ASP environment, but that I was struggling with how I would go about it in a linux (no ASP) environment. I've done more javascript than php, so I was trying that and getting nowhere.

          I was able to learn enough php to get going, so I'm now able to collect the postback data and populate the form on error or decline.

          For other users trying the same, here's the links I used for reference to pick up the php I needed to collect the postback info:
          http://php.net/manual/en/tutorial.php
          http://www.apptools.com/phptools/forms/forms1.php (it's for a form that sends an email, but the necessary concepts are there)

          thanks for the responses and assistance, a very relieved Amanda

          Comment


          • #6
            Great to hear it is working and sorry that I did not understand your question.

            Just an FYI - we are working on a PHP processor that will simplify your work when programming in PHP.

            I will ask that the examples that are currently under development to include a post back example as well.

            Thank you again for posting your links and helping the community.
            Regards,
            Click & Pledge Support Department

            On Salesforce? Help us by rating our app: Click & Pledge Donor Management on AppExchange

            Join us @ the educational webinars: https://clickandpledge.com/webinars/
            Live Support available Join between 3:00 - 3:30 p.m. ET Monday - Thursday: https://clickandpledge.com/webinars/
            Are you on Salesforce? Join us at the Power of Us Hub: https://powerofus.force.com/0F980000000CjpC

            Comment

            Working...
            X