4 Replies Latest reply on Jun 19, 2013 2:30 AM by dataclip

    callback problem to get data into FileMaker

    dataclip

      I am trying to use FM Go to initiate a payment procedure with a financial app. Through callback I want to get the result of the transaction back into FM Go.

      This process works fine, except for the fact that I do net get the result back into FM. I have tried both the get script parameter and the variable option. Also tested both FM Go 11 and 12.

      Here is an example of the URL I generate (in the application it is properly URL encoded, here I have used the original characters to improve eligibility).

       

      adyen://payment?session_id=55&amount=016&currency=EUR&reference=17-6-2013&start_immediately=1&callback=fmp7script://$/AdyenTest&script=process_var&$Data=result


       

      The Adyen app returns the following URL (I have deleted some info returned to improve eligibility)

       

       

      http://$/AdyenTest?originalAmountValue=16&originalAmountCurrency=EUR&startMonth=08&result=APPROVED&......&script=process_var&expiryYear=2016&....&cardScheme=7&%24Data=result&checksum=48&.........

       

      AS you can see the app returns result=APPROVED, the URL also contains the script and the variable I defined. The script in FM Go gets triggered through the callback. However the script does not write the actual result into a field, but the word result. So the place holder in $Data is not replaced by the actual result.

       

      Any ideas on why this is not happening (or why this is not possible) would be appreciated.

       

      Joost Kingma

        • 1. Re: callback problem to get data into FileMaker
          PeterWindle

          Try using "import" and then specify the URL, import into a field, this should work

          • 2. Re: callback problem to get data into FileMaker
            dataclip

            I did a quick test with http://$/AdyenTest? as url and used a script in the callback procedure that insrted the url contant in a field.

            However, the field remains empty.

            Maybe the problem is that the url is generated dynamically by the other app?

            • 3. Re: callback problem to get data into FileMaker
              PSI

              Hi Joost,

               

              I think you have to find out how the other app returns the response. My experience with CardSwipe, an app i built for capturing mag stripe data, we append the result of the swipe to the end of the URL string. In your case i would remove the word Result at the end...

               

              adyen://payment?session_id=55&amount=016&currency=EUR&reference=17-6-2013&start_immediately=1&callback=fmp7script://$/AdyenTest&script=process_var&$Data=

               

               

              The adyen app should append the result to the end of this string. I assume this is 2 different scripts. 1 to send the payment request to ayden. the second being process_var. Use the script debugger and when process-var fires off use the data viewer to see if $Data gets created?

              If you see data then it's in your script. If not you need to talk to adyen support.

              John Morina

              PSI

              CCQ-FM

              • 4. Re: callback problem to get data into FileMaker
                dataclip

                Hello John,

                 

                Thanks for your reply.

                 

                You are correct that these are 2 different scripts. I modeled this after some barcode examples I found (pic2shop, i cody).

                 

                The URL I listed is the actual repsonse. Someone pointed out to me that if you subsitute fmp7script with http the other app will send the callback to the browser and try open it. Of course this generates an error, but it allows you to view the actual callback string.

                 

                so when I try your suggestion and leave the variable emtpy  I test it as

                 

                adyen://payment?session_id=19&amount=019&currency=EUR&reference=19-6-2013&start_immediately=1&callback=http://$/AdyenTest?script=process_var&$Data=

                 

                Result URL (substiuted part of the string with .....)

                 

                http://$/AdyenTest?originalAmountValue=19&originalAmountCurrency=EUR&startMonth=08&result=APPROVED&.....&txdate=6%2F19%2F13&script=process_var&expiryYear=2016&.....&

                $Data=&checksum=51&posEntryMode=ICC&.....

                 

                The strange thing is that the Adyen app inserts the defined part of the callback URL in the reponse instead of appending their results at the end.

                However FM GO 11 seems to recognize the script step  and still execute it ( I use set field to 1 & $Data to verify the script gets triggered). The only problem is that I do not get the actual result back. When I execute the above URL and use fmp7script instead of http the result field remains empty (shows only 1). Probably because the next character is &.

                I thought if I would use $Data=result the placeholder result would be replaced with the actual value (this is how it seems to work in the barcode examples I mentioned). I do not understand why this does not work in this situation.

                 

                I have contacted Adyen support about the strange insert behavior.

                 

                Any other thoughts or ideas are appreciated.

                 

                 

                 

                Joost Kingma

                DataClip