-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
186 lines (174 loc) · 6.33 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Churn Buster - Churn Messaging.</title>
<link rel="stylesheet" type="text/css" href="in-app-dunning.css">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet">
<style type="text/css">
body {
background: #fff;
color: #666;
font-family: 'Open Sans', sans-serif;
}
.wrapper {
width: 60%;
margin: 50px 20%;
}
.logo {
width: 150px;
height: 18px;
margin-bottom: 50px;
background: transparent url('https://cloud.githubusercontent.com/assets/472769/26270552/58fa663c-3cc1-11e7-979d-9e6cc0d2a5ca.png') no-repeat center center;
background-size: 150px 18px;
text-indent: -8000px;
}
h1 {
margin-bottom: 5px;
color: #ca006e;
}
h2, h3 {
margin-top: 0;
color: #016dff;
}
tr.even {
background-color: #f7f7f7;
border-radius: 3px;
}
th {
padding: 5px;
text-align: left;
color: #ca006e;
}
td {
padding: 5px;
}
pre {
padding: 25px;
background-color: #f3f1e8;
border: 1px solid #ebe7d9;
border-radius: 3px;
overflow: scroll;
}
.example img {
display: block;
width: 100%;
margin: 25px 0;
border-radius: 3px;
}
</style>
</head>
<body>
<div class="wrapper">
<div class="logo">Churn Buster</div>
<h1>In-App Dunning for Failed Payments</h1>
<h2>Compatible with Stripe, Braintree, Authorize.net, and any other payment processor</h2>
<div class="example"><img src="https://cloud.githubusercontent.com/assets/472769/26421100/6c2ec082-408a-11e7-9932-9e652d94abd1.png" /></div>
<p>In-app-dunning is a javascript library that allows you respond to failed payments by displaying a message to subscribers while they are logged into your app.</p>
<p>It's an easy way to give them a nudge to update their payment method while you have their attention.</p>
<p>If you are finding failed payments to be a regular problem, check out our core application at <a href="https://churnbuster.io">https://churnbuster.io</a>.</p>
<h3>Requirements</h3>
<p>The library only requires 1 thing to work (as outlined below), a url for your payment form.</p>
<h3>Installation</h3>
<p>You'll need access to the customers 'failed payment status' and to wrap InAppDunning.show in an if statement. To get started you can simply copy/paste the code below, **REPLACE 'CUSTOMER_FAILED_PAYMENT_STATUS' WITH YOUR REAL VARIABLE** and customize the variables to what you want (or remove the ones you don't want to customize or use).</p>
<pre><script type="text/javascript" src="in-app-dunning.js"></script>
<script type="text/javascript">
if (CUSTOMER_FAILED_PAYMENT_STATUS == "failed") {
InAppDunning.show({
url: 'https://churnbuster.io/update',
style: 'modal', // modal|bar
close: true,
position: 'center', // modal: center|bottom-right|bottom-left|top-right|top-left // bar: top|bottom
button: {
color: '#fff',
bgColor: '#2ecc71'
},
modal: {
overlay: true
},
bar: {
color: '#3498db',
bgColor: '#ffffff'
}
});
}
</script></pre>
<h3>Customization Options</h3>
<p>As you can see in the above code block, we've provided a ton of options to customize this library. Here's a breakdown and explanation for each option (* = required):</p>
<table>
<tr>
<th width="25%">Option</th>
<th width="50%">Explanation/Settings</th>
<th width="25%">Default</th>
</tr>
<tr class="even">
<td>url<sup>*</sup></td>
<td>This is the url you want the button in the message to go to (most likely a payment form)</td>
<td>blank</td>
</tr>
<tr>
<td>style</td>
<td>Can be either `modal` or `bar`</td>
<td>modal</td>
</tr>
<tr class="even">
<td>close</td>
<td>Set this to `true` to allow the user to close the message, set it to false to force them to look at it until they take action</td>
<td>true</td>
</tr>
<tr>
<td>position</td>
<td>Depending whether you've set the style to modal or bar you can position the message many ways. Modal options are: `center`, `bottom-right`, `bottom-left`, `top-right`, `top-left`, bar options are: `top` or `bottom`</td>
<td>modal = center, bar = bottom</td>
</tr>
<tr class="even">
<td>button.color</td>
<td>Sets the color of the text in the button</td>
<td>white</td>
</tr>
<tr>
<td>button.bgColor</td>
<td>Sets the background color of the button</td>
<td>green</td>
</tr>
<tr class="even">
<td>modal.overlay</td>
<td>Sets whether to use an overlay under the modal to ensure no other options can be clicked, only availabe if style = modal, can either be `true` or `false`</td>
<td>true</td>
</tr>
<tr>
<td>bar.color</td>
<td>Sets the text color used in the bar style. Style must equal bar.</td>
<td>blue</td>
</tr>
<tr class="even">
<td>bar.bgColor</td>
<td>Sets the background color of the bar. Style must be set to bar.</td>
<td>white</td>
</tr>
</table>
<p><small>Copyright 2017 Churn Buster - Released under the MIT License</small></p>
</div>
<script type="text/javascript" src="in-app-dunning.js"></script>
<script type="text/javascript">
InAppDunning.show({
url: 'https://churnbuster.io/update',
style: 'modal', // modal|bar
close: true,
position: 'center', // modal: center|bottom-right|bottom-left|top-right|top-left // bar: top|bottom
button: {
color: '#fff',
bgColor: '#2ecc71'
},
modal: {
overlay: true
},
bar: {
color: '#3498db',
bgColor: '#d5e7f3'
}
});
</script>
</body>
</html>