Couple of issues with passing values into Square Integration

  • IMSABC
    Asked on January 2, 2017 at 11:25 AM

    Hi all JotForm folk.  Thanks for the great work with the integrations - and the form builder is pretty slick too!

    I have tried using the products option of the widget and while most elegant for some situations, it does lack the flexibility for complex arrangements without a lot of duplication which makes ongoing maintenance onerous.  Probably not practical to add conditional capabilities so passing a form total to the widget is the next option.

    I am having some problems doing that!  I think these are similar issues to some reported earlier for the PayPal integration.

    The square widget is set for Canadian donations and using the sandbox.

    1) I can't get the URL method for passing params into the square widget directly to work

    2) I can't get the widget to recognize a field calculated with conditions.  It will recognize a calculation widget field though.

    3) Using the calculation widget method, the value passed does not retain currency format.  This is most concerning as the others have workarounds.

    As a feature request, the ability to pass a description and/or transaction field to square (and other payment processors) so that it appears with the charges in the payment system is pretty important for reconciliation.  Even better would be two - a description and a transaction field.

    Thanks in advance!

  • Ashwin JotForm Support
    Replied on January 2, 2017 at 12:46 PM

    Hello IMSABC,

    1) I can't get the URL method for passing params into the square widget directly to work

    Which field of Stripe question you would like to pre-populate? I did check your form and found that you are populating the custom amount field with the value of form calculation widget. Please note that it is possible to populate the amount field with URL parameter. Please check the following pre-population URL of your form to populate amount field:  https://www.jotform.com/70010937218247?total1[price]=30

     

    2) I can't get the widget to recognize a field calculated with conditions.  It will recognize a calculation widget field though.

    Unfortunately it is not possible to "Get Price From" form any calculated textbox. The only possibility is to get the price from "Form Calculation" widget only. One way to achieve your requirement is to add condition to directly update the price of form calculation widget instead of using textbox. 

     

    3) Using the calculation widget method, the value passed does not retain currency format.  This is most concerning as the others have workarounds.

    I have moved this question to a new thread and you will be answered here:  https://www.jotform.com/answers/1023509

    Thank you!

  • IMSABC
    Replied on January 2, 2017 at 1:50 PM

    Thank you for looking at this.  I see that I messed up the field name format which would account for my not being able to use the URL method.  I did try to update the payment form directly using conditions.  Given your example it looks like a compound field is required - but it is not obvious how to do that in the conditions wizard.

  • Welvin Support Team Lead
    Replied on January 2, 2017 at 3:24 PM

    The conditional logic is a different function and you cannot do the same parameters. The conditional logic allows you to directly target an input. However, targeting the amount box in the payment field is not possible in the conditional logic. 

    To get the amount, you need to do the following:

    1. Add a calculation widget (https://www.jotform.com/help/259-How-to-perform-calculation-in-the-form).

    2. Target this widget with your parameter, the amount.

    3. Pass the value in the calculation widget to the payment field. Here's how: https://www.jotform.com/help/275-How-to-pass-a-calculation-to-a-payment-field.

    Here's my cloned version of your form: 

    https://www.jotformpro.com/form/70015510218946?total=190

  • IMSABC
    Replied on January 2, 2017 at 6:24 PM

    Thank You.  The reason I pointed out that the conditional technique was not working was that in one of the forum docs it mentioned specifically with examples, that both techniques would work.  For what I am trying to accomplish, the URL method is required - and cleaner if you don't have to add an extra field and calculation.

    I have got the URL method working - again!  It appeared to be intermittent.....

    I have discovered that the payment widget modifies the unique fieldname value as you edit widget fields.  This is what kept tripping me up as I was targeting an incorrect field name.  Solution is to make sure that you have finished messing with the widget before setting the unique fieldname as the target field for the URL!

    The [price] subfield that you use for URL method does not show up in the field name list.  Are there any other subfields that are available in the square widget?

  • Kevin Support Team Lead
    Replied on January 2, 2017 at 10:40 PM

    With conditions you may calculate the total amount to be passed to your payment field; however, it is required to add the calculation widget since the payment field will recognize the widget only and not a plain text or any other field, you may also apply the result from a condition directly to a calculation widget, but it will be always required. 

    Now, regarding to the field's name I can see it does work properly on my end, for example, I have changed the default name to another and made some changes to the integration, when I went back to the field settings I noticed the name was still the one I defined: 

    Couple of issues with passing values into Square Integration Image 1 Screenshot 40

    The [price] subfield that you use for URL method does not show up in the field name list.  Are there any other subfields that are available in the square widget?

    I could not understood completely what you were referring with the "[price] sub-field"; however, do note that with the URL you are able to pre-populate all the info you need, for example, if you're using your payment integration to collect a custom amount that you will pass through the URL then you may simply pass it without using the calculation widget, this needs to be done only if the amount passed in the URL will not be changed. 

    For example, on the cloned form of yours I used this URL: https://www.jotformpro.com/form/70018818393964?paymentfield[price]=10 

    This should be the result: 

    Couple of issues with passing values into Square Integration Image 2 Screenshot 51

    Now, to get the parameter you need to inspect the web console, you can do it by right clicking on the payment field and selecting the option inspect, once in the web console you should copy the field name after the "_" then use it in the URL and it should pre-populate the field properly:

    Couple of issues with passing values into Square Integration Image 3 Screenshot 62

    You may also do the same with some other sub-fields in the payment field. 

    If you have any question, please let us know. 

  • lizgreer
    Replied on January 12, 2017 at 2:47 PM

    I think I have a related question: I'm using the Square widget, calculating tax, it's all good - BUT - when the data is passed back to Square, the sales tax amount is being rolled up into "Gross Sales" and not being split out as "Tax" ("Tax" just shows us as zero.) So to be clear, it is being calculated and collected in JotForm, but then when passed back to Square, the tax amount is being rolled up into Gross Sales. And then the customer receipts are just showing a 'custom amount' and no sales tax (although the sales tax amount is rolled up into the 'custom amount').

    So the good news is it is collecting tax; but the bad news is I'll have no way of summarizing/reporting it as sales tax, which will not work for me long term.

    Any clues?

  • Kevin Support Team Lead
    Replied on January 12, 2017 at 3:52 PM

    @lizgreer,

    In order to assist you better I have moved your question to another thread, it can be found here: https://www.jotform.com/answers/1033114 

    We will assist you there as soon as possible.