Select Page
Methods Documentation
Edit on
Codepen.io

fastspring.builder.recognize({paymentContact object})

Applies “tentatively” known (unconfirmed) customer information to the order but won’t hide input fields during checkout process.


x
42
 
1
<!--
2
    DEMO INFO
3
    recognize() will add user info to the browser session in order to prepopulate fields
4
    in the checkout popup. You will not see the info as plain text in the response builder
5
    object and it can only be accessed through the session.
6
-->
7
<!--
8
    Button to call the custom function to make the fastspring.builder.recognize() call
9
-->
10
<button onclick="pushToFastSpring();">Recognize Buyer and Checkout</button>
11
12
<!--
13
    Custom function to make the fastspring.builder.recognize() call
14
-->
15
<script type="text/javascript">
16
    function pushToFastSpring() {
17
        fastspring.builder.recognize(
18
            {
19
                "email":"myName@email.com",
20
                "firstName":"myFirstName",
21
                "lastName":"myLastName"
22
            }
23
        );
24
        fastspring.builder.checkout();
25
    }
26
</script>
27
28
<!--
29
    DEMO SETUP
30
        - Initialize the Store Builder Library
31
        - Add item to the cart
32
-->
33
<script
34
    id="fsc-api"
35
    src="https://sbl.onfastspring.com/sbl/1.0.2/fastspring-builder.min.js"
36
    type="text/javascript"
37
    data-storefront="fastspringexamples.test.onfastspring.com/popup-fastspringexamples">
38
</script>
39
40
<script type="text/javascript">
41
    fastspring.builder.add('phot-io-main-app')
42
</script>
1
 
1
1
 
1

Related Topics