Methods Documentation
Edit on
Codepen.io
Codepen.io
fastspring.builder.recognizeRecipients({recipient object})
Applies “tentatively” known (unconfirmed) gift recipient information to the order but won’t hide input fields during checkout process.
x
50
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.recognizeRecipients(
18
{
19
"email":"myName@email.com",
20
"firstName":"myFirstName",
21
"lastName":"myLastName",
22
"address": {
23
"addressLine1": "Address Line 1",
24
"city": "City",
25
"region": "California",
26
"postalCode": "93101",
27
"country": "US"
28
},
29
"memo": "Happy Birthday!"
30
}
31
);
32
fastspring.builder.checkout();
33
}
34
</script>
35
36
<!--
37
DEMO SETUP
38
- Initialize the Store Builder Library
39
- Add item to the cart
40
-->
41
<script
42
id="fsc-api"
43
src="https://sbl.onfastspring.com/sbl/1.0.2/fastspring-builder.min.js"
44
type="text/javascript"
45
data-storefront="fastspringexamples.test.onfastspring.com/popup-gift">
46
</script>
47
48
<script type="text/javascript">
49
fastspring.builder.add('physical');
50
</script>
1
1
1
1