atpay_buttons 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -88,15 +88,21 @@ The button generator requires a few flags up front:
88
88
  <p><strong>image:</strong> <br />
89
89
  <i> &nbsp; &nbsp; &nbsp; The URL to a small thumbnail image to be used in the button <br /> &nbsp; &nbsp; &nbsp; Default: https://www.atpay.com/wp-content/themes/atpay/images/bttn_cart.png</i></p>
90
90
 
91
- <p><strong>color:</strong> <br />
91
+ <p><strong>background-color:</strong> <br />
92
92
  <i> &nbsp; &nbsp; &nbsp; The background color of the button <br /> &nbsp; &nbsp; &nbsp; Default: #6dbe45</i></p>
93
93
 
94
+ <p><strong>foreground-color:</strong> <br />
95
+ <i> &nbsp; &nbsp; &nbsp; The foreground color of the button <br /> &nbsp; &nbsp; &nbsp; Default: #ffffff</i></p>
96
+
94
97
  <p><strong>title:</strong> <br />
95
98
  <i> &nbsp; &nbsp; &nbsp; The title for each button</i></p>
96
99
 
97
100
  <p><strong>wrap:</strong> <br />
98
101
  <i> &nbsp; &nbsp; &nbsp; Will use wrapped (with a styled div container) version of template <br /> &nbsp; &nbsp; &nbsp; Default: false</i></p>
99
102
 
103
+ <p><strong>wrap-text:</strong> <br />
104
+ <i> &nbsp; &nbsp; &nbsp; Text to use within the wrapper <br /> &nbsp; &nbsp; &nbsp; Default: "Made for Mobile"</i></p>
105
+
100
106
  <p><strong>templates:</strong> <br />
101
107
  <i> &nbsp; &nbsp; &nbsp; Location of button templates <br /> &nbsp; &nbsp; &nbsp; Default: ./lib/atpay/button/templates</i></p>
102
108
 
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "atpay_buttons"
7
- spec.version = '1.1.1'
7
+ spec.version = '1.1.2'
8
8
  spec.date = '2013-09-24'
9
9
  spec.authors = ["Thomas Pastinsky", "Glen Holcomb", "James Kassemi", "Isaiah Baca"]
10
10
  spec.email = ["dev@atpay.com"]
data/bin/atpay_buttons CHANGED
@@ -33,9 +33,11 @@ require_relative '../lib/atpay_buttons.rb'
33
33
  opt :subject, "The subject of the mailto: email (the message that a user will be sending to @Pay's servers after clicking the button", :type => :string
34
34
  opt :signup_url, "This is the signup url for recipients that don't have @Pay Records", :type => :string
35
35
  opt :image_url, "The URL to a small thumbnail image to be used in the button. Default: https://www.atpay.com/wp-content/themes/atpay/images/bttn_cart.png", :type => :string, :default => "https://www.atpay.com/wp-content/themes/atpay/images/bttn_cart.png"
36
- opt :color, "The background color of the button. Default: #6dbe45", :type => :string, :default => "#6dbe45"
36
+ opt :background_color, "The background color of the button. Default: #6dbe45", :type => :string, :default => "#6dbe45"
37
+ opt :foreground_color, "The foreground color of the button. Default: #ffffff", :type => :string, :default => "#ffffff"
37
38
  opt :title, "The title for each button", :type => :string
38
39
  opt :wrap, "Will use wrapped (with a styled div container) version of the template. Default: false", :type => :boolean, :default => false
40
+ opt :wrap_text, "Text to use for the wrapper if wrap is true. Default: 'Made for Mobile'", :type => :string, :default => "Made for Mobile"
39
41
  opt :env, "The environment you want to generate buttons for. Currently sandbox or production", :default => 'production'
40
42
  opt :templates, "Location of button templates.", :type => :string, :default => File.dirname(__FILE__) + '/../lib/atpay/button/templates'
41
43
  opt :user_data, "Optional user data to be passed in for your use", :type => :string
@@ -9,11 +9,13 @@ module AtPay
9
9
  @options = {
10
10
  :subject => "Submit @Pay Payment",
11
11
  :title => "Pay",
12
- :color => "#6dbe45",
12
+ :background_color => "#6dbe45",
13
+ :foreground_color => "#ffffff",
13
14
  :image => "https://www.atpay.com/wp-content/themes/atpay/images/bttn_cart.png",
14
15
  :processor => "transaction@secure.atpay.com",
15
16
  :templates => File.join(File.dirname(__FILE__), "/templates"),
16
- :wrap => false
17
+ :wrap => false,
18
+ :wrap_text => "Made for Mobile"
17
19
  }.update(options)
18
20
  end
19
21
 
@@ -2,30 +2,30 @@
2
2
  .ExternalClass a.outlook {display:inline; display: inline !important;font-size: 20px !important;}
3
3
  .ExternalClass a.outlooksm {display:inline; display: inline !important;font-size: 12px !important;}
4
4
  .ExternalClass a.not_outlook {display:none; display: none !important;}
5
- .ExternalClass a.outlook table {background-color:#6dbe45 !important; font-size:10px !important; }
5
+ .ExternalClass a.outlook table {background-color:{{background_color}} !important; font-size:10px !important; }
6
6
  .ExternalClass a.outlook table td.main {width:145px !important; padding:3px 5px 5px 5px !important;}
7
7
  .ExternalClass a.outlook table td img {width:auto !important; height: 39px !important; margin-left: 5px !important; margin-right:10px !important; margin-top:8px !important;}
8
8
  .ExternalClass a.outlook table.sub {width: auto !important; height: auto !important;}
9
- .ExtenralClass a.outlook td.title {font-size: 11px !important ; color: #ffffff; font-family: Tahoma; text-align:center; padding:0; margin:0;}
9
+ .ExtenralClass a.outlook td.title {font-size: 11px !important ; color: {{foreground_color}} font-family: Tahoma; text-align:center; padding:0; margin:0;}
10
10
  .ExternalClass a.outlook table.subB{float:left; margin:0; margin-left:5px !important;}
11
11
  </style>
12
12
  <center>
13
13
 
14
14
  <a border='0' class='not_outlook' href='{{url}}' style='text-underline:none;'>
15
- <table border='0' cellpadding='0' cellspacing='0' style='background-color:#6dbe45;'>
15
+ <table border='0' cellpadding='0' cellspacing='0' style='background-color:{{background_color}};'>
16
16
  <tr class='main'>
17
17
  <td class='main' style='padding:3px 5px 5px 5px;' width='145'>
18
18
  <table>
19
19
  <tr>
20
20
  <td>
21
- <a class='not_outlook' href='{{url}}' style='color:#ffffff; text-decoration:none; border:none; display:inline;'>
21
+ <a class='not_outlook' href='{{url}}' style='color:{{foreground_color}}; text-decoration:none; border:none; display:inline;'>
22
22
  <img src='{{image}}' style='margin-left: 5px; margin-right:10px; margin-top:8px;'>
23
23
  </a>
24
24
  </td>
25
25
  <td>
26
26
  <table border='0' cellpadding='0' cellspacing='0' style='float:left; margin:0; margin-left:5px;'>
27
27
  <tr>
28
- <td style='font-size: 11px; color: #ffffff; font-family: Tahoma; text-align:center; padding:0; margin:0;'>
28
+ <td style='font-size: 11px; color: {{foreground_color}}; font-family: Tahoma; text-align:center; padding:0; margin:0;'>
29
29
  {{title}}
30
30
  </td>
31
31
  </tr>
@@ -33,13 +33,13 @@
33
33
  <td>
34
34
  <table border='0' cellpadding='0' cellspacing='0' style='margin:0; padding:0;'>
35
35
  <tr>
36
- <td style='padding:0; margin:0; font-size: 20px; color: #ffffff; font-family: Tahoma; vertical-align:top; line-height:25px;' valign='top'>
37
- <a class='not_outlook' href='{{url}}' style='color:#ffffff; text-decoration:none; border:none; display:inline;'>
36
+ <td style='padding:0; margin:0; font-size: 20px; color: {{foreground_color}}; font-family: Tahoma; vertical-align:top; line-height:25px;' valign='top'>
37
+ <a class='not_outlook' href='{{url}}' style='color:{{foreground_color}}; text-decoration:none; border:none; display:inline;'>
38
38
  {{dollar}}
39
39
  </a>
40
40
  </td>
41
- <td style='padding:0; margin:0; font-size:14px; text-decoration:underline;padding-left:2px; color: #ffffff; font-family: Tahoma; vertical-align:top;' valign='top'>
42
- <a class='not_outlook' href='{{url}}' style='color:#ffffff; text-decoration:none; border:none; display:inline;'>
41
+ <td style='padding:0; margin:0; font-size:14px; text-decoration:underline;padding-left:2px; color: {{foreground_color}}; font-family: Tahoma; vertical-align:top;' valign='top'>
42
+ <a class='not_outlook' href='{{url}}' style='color:{{foreground_color}}; text-decoration:none; border:none; display:inline;'>
43
43
  {{cents}}
44
44
  </a>
45
45
  </td>
@@ -56,20 +56,20 @@
56
56
  </table>
57
57
  </a>
58
58
  <a border='0' class='outlook' href='{{outlook_url}}' style='text-underline:none; font-size:0px; width:0px; height: 0px;'>
59
- <table border='0' cellpadding='0' cellspacing='0' height='0' style='background-color:#ffffff; overflow: hidden; font-size: 0px; ' width='0'>
59
+ <table border='0' cellpadding='0' cellspacing='0' height='0' style='background-color:{{foreground_color}}; overflow: hidden; font-size: 0px; ' width='0'>
60
60
  <tr class='main'>
61
61
  <td class='main' style='padding: 0px;' width='0'>
62
- <table border='0' cellpadding='0' cellspacing='0' class='sub' height='' style='background-color:#ffffff; overflow: hidden;' width=''>
62
+ <table border='0' cellpadding='0' cellspacing='0' class='sub' height='' style='background-color:{{foreground_color}}; overflow: hidden;' width=''>
63
63
  <tr>
64
64
  <td style='line-height:1px;'>
65
- <a class='outlook' href='{{outlook_url}}' style='color:#ffffff; text-decoration:none; border:none;'>
65
+ <a class='outlook' href='{{outlook_url}}' style='color:{{foreground_color}}; text-decoration:none; border:none;'>
66
66
  <img height='1' src='{{image}}' style='text-indent:-9999px; margin: 0px; width:1px; height:1px' width='1'>
67
67
  </a>
68
68
  </td>
69
69
  <td>
70
70
  <table border='0' cellpadding='0' cellspacing='0' class='subB' style='float:left; margin:0; margin-left:0px;'>
71
71
  <tr>
72
- <td class='title' style='font-size: 0px; color: #ffffff; font-family: Tahoma; text-align:center; padding:0; margin:0;'>
72
+ <td class='title' style='font-size: 0px; color: {{foreground_color}}; font-family: Tahoma; text-align:center; padding:0; margin:0;'>
73
73
  {{title}}
74
74
  </td>
75
75
  </tr>
@@ -77,13 +77,13 @@
77
77
  <td>
78
78
  <table border='0' cellpadding='0' cellspacing='0' style='margin:0; padding:0;'>
79
79
  <tr>
80
- <td style='padding:0; margin:0; font-size: 0px; color: #ffffff; font-family: Tahoma; vertical-align:top; line-height:0px;' valign='top'>
81
- <a class='outlook' href='{{outlook_url}}' style='color:#ffffff; text-decoration:none; border:none;'>
80
+ <td style='padding:0; margin:0; font-size: 0px; color: {{foreground_color}}; font-family: Tahoma; vertical-align:top; line-height:0px;' valign='top'>
81
+ <a class='outlook' href='{{outlook_url}}' style='color:{{foreground_color}}; text-decoration:none; border:none;'>
82
82
  {{dollar}}
83
83
  </a>
84
84
  </td>
85
- <td style='padding:0; margin:0; font-size:0px; text-decoration:underline;padding-left:0px; color: #ffffff; font-family: Tahoma; vertical-align:top;' valign='top'>
86
- <a class='outlooksm' href='{{outlook_url}}' style='color:#ffffff; text-decoration:none; border:none;'>
85
+ <td style='padding:0; margin:0; font-size:0px; text-decoration:underline;padding-left:0px; color: {{foreground_color}}; font-family: Tahoma; vertical-align:top;' valign='top'>
86
+ <a class='outlooksm' href='{{outlook_url}}' style='color:{{foreground_color}}; text-decoration:none; border:none;'>
87
87
  {{cents}}
88
88
  </a>
89
89
  </td>
@@ -3,11 +3,11 @@
3
3
  .ExternalClass a.outlook {display:inline; display: inline !important;font-size: 20px !important;}
4
4
  .ExternalClass a.outlooksm {display:inline; display: inline !important;font-size: 12px !important;}
5
5
  .ExternalClass a.not_outlook {display:none; display: none !important;}
6
- .ExternalClass a.outlook table {background-color:#6dbe45 !important; font-size:10px !important; }
6
+ .ExternalClass a.outlook table {background-color:{{background_color}} !important; font-size:10px !important; }
7
7
  .ExternalClass a.outlook table td.main {width:145px !important; padding:3px 5px 5px 5px !important;}
8
8
  .ExternalClass a.outlook table td img {width:auto !important; height: 39px !important; margin-left: 5px !important; margin-right:10px !important; margin-top:8px !important;}
9
9
  .ExternalClass a.outlook table.sub {width: auto !important; height: auto !important;}
10
- .ExtenralClass a.outlook td.title {font-size: 11px !important ; color: #ffffff; font-family: Tahoma; text-align:center; padding:0; margin:0;}
10
+ .ExtenralClass a.outlook td.title {font-size: 11px !important ; color: {{foreground_color}}; font-family: Tahoma; text-align:center; padding:0; margin:0;}
11
11
  .ExternalClass a.outlook table.subB{float:left; margin:0; margin-left:5px !important;}
12
12
  </style>
13
13
 
@@ -20,7 +20,7 @@
20
20
  <tr>
21
21
  <td colspan='3'>
22
22
  <p style='margin-bottom:0px; color: #515050; font-size:12px; margin-top:2px; text-align:center;'>
23
- Made For Mobile
23
+ {{wrap_text}}
24
24
  </p>
25
25
  </td>
26
26
  </tr>
@@ -29,20 +29,20 @@
29
29
  <!-- BUTTON CODE -->
30
30
  <center>
31
31
  <a border='0' class='not_outlook' href='{{url}}' style='text-underline:none;'>
32
- <table border='0' cellpadding='0' cellspacing='0' style='background-color:#6dbe45;'>
32
+ <table border='0' cellpadding='0' cellspacing='0' style='background-color:{{background_color}};'>
33
33
  <tr class='main'>
34
34
  <td class='main' style='padding:3px 5px 5px 5px;' width='145'>
35
35
  <table>
36
36
  <tr>
37
37
  <td>
38
- <a class='not_outlook' href='{{url}}' style='color:#ffffff; text-decoration:none; border:none; display:inline;'>
38
+ <a class='not_outlook' href='{{url}}' style='color:{{foreground_color}}; text-decoration:none; border:none; display:inline;'>
39
39
  <img src='{{image}}' style='margin-left: 5px; margin-right:10px; margin-top:8px;'>
40
40
  </a>
41
41
  </td>
42
42
  <td>
43
43
  <table border='0' cellpadding='0' cellspacing='0' style='float:left; margin:0; margin-left:5px;'>
44
44
  <tr>
45
- <td style='font-size: 11px; color: #ffffff; font-family: Tahoma; text-align:center; padding:0; margin:0;'>
45
+ <td style='font-size: 11px; color: {{foreground_color}}; font-family: Tahoma; text-align:center; padding:0; margin:0;'>
46
46
  {{title}}
47
47
  </td>
48
48
  </tr>
@@ -50,13 +50,13 @@
50
50
  <td>
51
51
  <table border='0' cellpadding='0' cellspacing='0' style='margin:0; padding:0;'>
52
52
  <tr>
53
- <td style='padding:0; margin:0; font-size: 20px; color: #ffffff; font-family: Tahoma; vertical-align:top; line-height:25px;' valign='top'>
54
- <a class='not_outlook' href='{{url}}' style='color:#ffffff; text-decoration:none; border:none; display:inline;'>
53
+ <td style='padding:0; margin:0; font-size: 20px; color: {{foreground_color}}; font-family: Tahoma; vertical-align:top; line-height:25px;' valign='top'>
54
+ <a class='not_outlook' href='{{url}}' style='color:{{foreground_color}}; text-decoration:none; border:none; display:inline;'>
55
55
  {{dollar}}
56
56
  </a>
57
57
  </td>
58
- <td style='padding:0; margin:0; font-size:14px; text-decoration:underline;padding-left:2px; color: #ffffff; font-family: Tahoma; vertical-align:top;' valign='top'>
59
- <a class='not_outlook' href='{{url}}' style='color:#ffffff; text-decoration:none; border:none; display:inline;'>
58
+ <td style='padding:0; margin:0; font-size:14px; text-decoration:underline;padding-left:2px; color: {{foreground_color}}; font-family: Tahoma; vertical-align:top;' valign='top'>
59
+ <a class='not_outlook' href='{{url}}' style='color:{{foreground_color}}; text-decoration:none; border:none; display:inline;'>
60
60
  {{cents}}
61
61
  </a>
62
62
  </td>
@@ -73,20 +73,20 @@
73
73
  </table>
74
74
  </a>
75
75
  <a border='0' class='outlook' href='{{outlook_url}}' style='text-underline:none; font-size:0px; width:0px; height: 0px;'>
76
- <table border='0' cellpadding='0' cellspacing='0' height='0' style='background-color:#ffffff; overflow: hidden; font-size: 0px; ' width='0'>
76
+ <table border='0' cellpadding='0' cellspacing='0' height='0' style='background-color:{{foreground_color}}; overflow: hidden; font-size: 0px; ' width='0'>
77
77
  <tr class='main'>
78
78
  <td class='main' style='padding: 0px;' width='0'>
79
- <table border='0' cellpadding='0' cellspacing='0' class='sub' height='' style='background-color:#ffffff; overflow: hidden;' width=''>
79
+ <table border='0' cellpadding='0' cellspacing='0' class='sub' height='' style='background-color:{{foreground_color}}; overflow: hidden;' width=''>
80
80
  <tr>
81
81
  <td style='line-height:1px;'>
82
- <a class='outlook' href='{{outlook_url}}' style='color:#ffffff; text-decoration:none; border:none;'>
82
+ <a class='outlook' href='{{outlook_url}}' style='color:{{foreground_color}}; text-decoration:none; border:none;'>
83
83
  <img height='1' src='{{image}}' style='text-indent:-9999px; margin: 0px; width:1px; height:1px' width='1'>
84
84
  </a>
85
85
  </td>
86
86
  <td>
87
87
  <table border='0' cellpadding='0' cellspacing='0' class='subB' style='float:left; margin:0; margin-left:0px;'>
88
88
  <tr>
89
- <td class='title' style='font-size: 0px; color: #ffffff; font-family: Tahoma; text-align:center; padding:0; margin:0;'>
89
+ <td class='title' style='font-size: 0px; color: {{foreground_color}}; font-family: Tahoma; text-align:center; padding:0; margin:0;'>
90
90
  {{title}}
91
91
  </td>
92
92
  </tr>
@@ -94,13 +94,13 @@
94
94
  <td>
95
95
  <table border='0' cellpadding='0' cellspacing='0' style='margin:0; padding:0;'>
96
96
  <tr>
97
- <td style='padding:0; margin:0; font-size: 0px; color: #ffffff; font-family: Tahoma; vertical-align:top; line-height:0px;' valign='top'>
98
- <a class='outlook' href='{{outlook_url}}' style='color:#ffffff; text-decoration:none; border:none;'>
97
+ <td style='padding:0; margin:0; font-size: 0px; color: {{foreground_color}}; font-family: Tahoma; vertical-align:top; line-height:0px;' valign='top'>
98
+ <a class='outlook' href='{{outlook_url}}' style='color:{{foreground_color}}; text-decoration:none; border:none;'>
99
99
  {{dollar}}
100
100
  </a>
101
101
  </td>
102
- <td style='padding:0; margin:0; font-size:0px; text-decoration:underline;padding-left:0px; color: #ffffff; font-family: Tahoma; vertical-align:top;' valign='top'>
103
- <a class='outlooksm' href='{{outlook_url}}' style='color:#ffffff; text-decoration:none; border:none;'>
102
+ <td style='padding:0; margin:0; font-size:0px; text-decoration:underline;padding-left:0px; color: {{foreground_color}}; font-family: Tahoma; vertical-align:top;' valign='top'>
103
+ <a class='outlooksm' href='{{outlook_url}}' style='color:{{foreground_color}}; text-decoration:none; border:none;'>
104
104
  {{cents}}
105
105
  </a>
106
106
  </td>
@@ -157,4 +157,4 @@
157
157
  </td>
158
158
  </tr>
159
159
  </table>
160
- </center>
160
+ </center>
@@ -17,7 +17,7 @@
17
17
  <tr>
18
18
  <td colspan='3'>
19
19
  <p style='margin-bottom:0px; color: #515050; font-size:12px; margin-top:2px; text-align:center;'>
20
- Made For Mobile
20
+ {{wrap_text}}
21
21
  </p>
22
22
  </td>
23
23
  </tr>
@@ -26,20 +26,20 @@
26
26
 
27
27
  <center>
28
28
  <a border='0' class='yahoo' fix='email' href='{{yahoo_url}}' style='text-underline:none;'>
29
- <table border='0' cellpadding='0' cellspacing='0' style='background-color:{{color}};'>
29
+ <table border='0' cellpadding='0' cellspacing='0' style='background-color:{{background_color}};'>
30
30
  <tr class='main'>
31
31
  <td class='main' style='padding:3px 5px 5px 5px;' width='145'>
32
32
  <table>
33
33
  <tr>
34
34
  <td>
35
- <a class='yahoo' fix='email' href='{{yahoo_url}}' style='color:#ffffff; text-decoration:none; border:none; display:inline;'>
35
+ <a class='yahoo' fix='email' href='{{yahoo_url}}' style='color:{{foreground_color}}; text-decoration:none; border:none; display:inline;'>
36
36
  <img src='{{image}}' style='margin-left: 5px; margin-right:10px; margin-top:8px;'>
37
37
  </a>
38
38
  </td>
39
39
  <td>
40
40
  <table border='0' cellpadding='0' cellspacing='0' style='float:left; margin:0; margin-left:5px;'>
41
41
  <tr>
42
- <td style='font-size: 11px; color: #ffffff; font-family: Tahoma; text-align:center; padding:0; margin:0;'>
42
+ <td style='font-size: 11px; color: {{foreground_color}}; font-family: Tahoma; text-align:center; padding:0; margin:0;'>
43
43
  {{title}}
44
44
  </td>
45
45
  </tr>
@@ -47,13 +47,13 @@
47
47
  <td>
48
48
  <table border='0' cellpadding='0' cellspacing='0' style='margin:0; padding:0;'>
49
49
  <tr>
50
- <td style='padding:0; margin:0; font-size: 20px; color: #ffffff; font-family: Tahoma; vertical-align:top; line-height:25px;' valign='top'>
51
- <a class='yahoo' fix='email' href='{{yahoo_url}}' style='color:#ffffff; text-decoration:none; border:none; display:inline;'>
50
+ <td style='padding:0; margin:0; font-size: 20px; color: {{foreground_color}}; font-family: Tahoma; vertical-align:top; line-height:25px;' valign='top'>
51
+ <a class='yahoo' fix='email' href='{{yahoo_url}}' style='color:{{foreground_color}}; text-decoration:none; border:none; display:inline;'>
52
52
  {{dollar}}
53
53
  </a>
54
54
  </td>
55
- <td style='padding:0; margin:0; font-size:14px; text-decoration:underline;padding-left:2px; color: #ffffff; font-family: Tahoma; vertical-align:top;' valign='top'>
56
- <a class='yahoosm' fix='email' href='{{yahoo_url}}' style='color:#ffffff; text-decoration:none; border:none; display:inline;'>
55
+ <td style='padding:0; margin:0; font-size:14px; text-decoration:underline;padding-left:2px; color: {{foreground_color}}; font-family: Tahoma; vertical-align:top;' valign='top'>
56
+ <a class='yahoosm' fix='email' href='{{yahoo_url}}' style='color:{{foreground_color}}; text-decoration:none; border:none; display:inline;'>
57
57
  {{cents}}
58
58
  </a>
59
59
  </td>
@@ -70,20 +70,20 @@
70
70
  </table>
71
71
  </a>
72
72
  <a border='0' class='not_yahoo' fix='email' href='{{url}}' style='text-underline:none; display:none; font-size:0px; text-indent:-9999999;'>
73
- <table border='0' cellpadding='0' cellspacing='0' style='background-color:#6dbe45;'>
73
+ <table border='0' cellpadding='0' cellspacing='0' style='background-color:{{background_color}};'>
74
74
  <tr class='main'>
75
75
  <td class='main' style='padding:3px 5px 5px 5px;' width='145'>
76
76
  <table>
77
77
  <tr>
78
78
  <td>
79
- <a class='not_yahoo' href='{{url}}' style='color:#ffffff; text-decoration:none; border:none;'>
79
+ <a class='not_yahoo' href='{{url}}' style='color:{{foreground_color}}; text-decoration:none; border:none;'>
80
80
  <img src='{{image}}' style='margin-left: 5px; margin-right:10px; margin-top:8px;'>
81
81
  </a>
82
82
  </td>
83
83
  <td>
84
84
  <table border='0' cellpadding='0' cellspacing='0' style='float:left; margin:0; margin-left:5px;'>
85
85
  <tr>
86
- <td style='font-size: 11px; color: #ffffff; font-family: Tahoma; text-align:center; padding:0; margin:0;'>
86
+ <td style='font-size: 11px; color: {{foreground_color}}; font-family: Tahoma; text-align:center; padding:0; margin:0;'>
87
87
  {{title}}
88
88
  </td>
89
89
  </tr>
@@ -91,13 +91,13 @@
91
91
  <td>
92
92
  <table border='0' cellpadding='0' cellspacing='0' style='margin:0; padding:0;'>
93
93
  <tr>
94
- <td style='padding:0; margin:0; font-size: 20px; color: #ffffff; font-family: Tahoma; vertical-align:top; line-height:25px;' valign='top'>
95
- <a class='not_yahoo' fix='email' href='{{url}}' style='color:#ffffff; text-decoration:none; border:none;'>
94
+ <td style='padding:0; margin:0; font-size: 20px; color: {{foreground_color}}; font-family: Tahoma; vertical-align:top; line-height:25px;' valign='top'>
95
+ <a class='not_yahoo' fix='email' href='{{url}}' style='color:{{foreground_color}}; text-decoration:none; border:none;'>
96
96
  {{dollar}}
97
97
  </a>
98
98
  </td>
99
- <td style='padding:0; margin:0; font-size:14px; text-decoration:underline;padding-left:2px; color: #ffffff; font-family: Tahoma; vertical-align:top;' valign='top'>
100
- <a class='not_yahoosm' fix='email' href='{{url}}' style='color:#ffffff; text-decoration:none; border:none;'>
99
+ <td style='padding:0; margin:0; font-size:14px; text-decoration:underline;padding-left:2px; color: {{foreground_color}}; font-family: Tahoma; vertical-align:top;' valign='top'>
100
+ <a class='not_yahoosm' fix='email' href='{{url}}' style='color:{{foreground_color}}; text-decoration:none; border:none;'>
101
101
  {{cents}}
102
102
  </a>
103
103
  </td>
@@ -163,4 +163,4 @@
163
163
  </td>
164
164
  </tr>
165
165
  </table>
166
- </center>
166
+ </center>
@@ -11,20 +11,20 @@
11
11
 
12
12
  <center>
13
13
  <a border='0' class='yahoo' fix='email' href='{{yahoo_url}}' style='text-underline:none;'>
14
- <table border='0' cellpadding='0' cellspacing='0' style='background-color:{{color}};'>
14
+ <table border='0' cellpadding='0' cellspacing='0' style='background-color:{{background_color}};'>
15
15
  <tr class='main'>
16
16
  <td class='main' style='padding:3px 5px 5px 5px;' width='145'>
17
17
  <table>
18
18
  <tr>
19
19
  <td>
20
- <a class='yahoo' fix='email' href='{{yahoo_url}}' style='color:#ffffff; text-decoration:none; border:none; display:inline;'>
20
+ <a class='yahoo' fix='email' href='{{yahoo_url}}' style='color:{{foreground_color}}; text-decoration:none; border:none; display:inline;'>
21
21
  <img src='{{image}}' style='margin-left: 5px; margin-right:10px; margin-top:8px;'>
22
22
  </a>
23
23
  </td>
24
24
  <td>
25
25
  <table border='0' cellpadding='0' cellspacing='0' style='float:left; margin:0; margin-left:5px;'>
26
26
  <tr>
27
- <td style='font-size: 11px; color: #ffffff; font-family: Tahoma; text-align:center; padding:0; margin:0;'>
27
+ <td style='font-size: 11px; color: {{foreground_color}}; font-family: Tahoma; text-align:center; padding:0; margin:0;'>
28
28
  {{title}}
29
29
  </td>
30
30
  </tr>
@@ -32,13 +32,13 @@
32
32
  <td>
33
33
  <table border='0' cellpadding='0' cellspacing='0' style='margin:0; padding:0;'>
34
34
  <tr>
35
- <td style='padding:0; margin:0; font-size: 20px; color: #ffffff; font-family: Tahoma; vertical-align:top; line-height:25px;' valign='top'>
36
- <a class='yahoo' fix='email' href='{{yahoo_url}}' style='color:#ffffff; text-decoration:none; border:none; display:inline;'>
35
+ <td style='padding:0; margin:0; font-size: 20px; color: {{foreground_color}}; font-family: Tahoma; vertical-align:top; line-height:25px;' valign='top'>
36
+ <a class='yahoo' fix='email' href='{{yahoo_url}}' style='color:{{foreground_color}}; text-decoration:none; border:none; display:inline;'>
37
37
  {{dollar}}
38
38
  </a>
39
39
  </td>
40
- <td style='padding:0; margin:0; font-size:14px; text-decoration:underline;padding-left:2px; color: #ffffff; font-family: Tahoma; vertical-align:top;' valign='top'>
41
- <a class='yahoosm' fix='email' href='{{yahoo_url}}' style='color:#ffffff; text-decoration:none; border:none; display:inline;'>
40
+ <td style='padding:0; margin:0; font-size:14px; text-decoration:underline;padding-left:2px; color: {{foreground_color}}; font-family: Tahoma; vertical-align:top;' valign='top'>
41
+ <a class='yahoosm' fix='email' href='{{yahoo_url}}' style='color:{{foreground_color}}; text-decoration:none; border:none; display:inline;'>
42
42
  {{cents}}
43
43
  </a>
44
44
  </td>
@@ -55,20 +55,20 @@
55
55
  </table>
56
56
  </a>
57
57
  <a border='0' class='not_yahoo' fix='email' href='{{url}}' style='text-underline:none; display:none; font-size:0px; text-indent:-9999999;'>
58
- <table border='0' cellpadding='0' cellspacing='0' style='background-color:#6dbe45;'>
58
+ <table border='0' cellpadding='0' cellspacing='0' style='background-color:{{background_color}};'>
59
59
  <tr class='main'>
60
60
  <td class='main' style='padding:3px 5px 5px 5px;' width='145'>
61
61
  <table>
62
62
  <tr>
63
63
  <td>
64
- <a class='not_yahoo' href='{{url}}' style='color:#ffffff; text-decoration:none; border:none;'>
64
+ <a class='not_yahoo' href='{{url}}' style='color:{{foreground_color}}; text-decoration:none; border:none;'>
65
65
  <img src='{{image}}' style='margin-left: 5px; margin-right:10px; margin-top:8px;'>
66
66
  </a>
67
67
  </td>
68
68
  <td>
69
69
  <table border='0' cellpadding='0' cellspacing='0' style='float:left; margin:0; margin-left:5px;'>
70
70
  <tr>
71
- <td style='font-size: 11px; color: #ffffff; font-family: Tahoma; text-align:center; padding:0; margin:0;'>
71
+ <td style='font-size: 11px; color: {{foreground_color}}; font-family: Tahoma; text-align:center; padding:0; margin:0;'>
72
72
  {{title}}
73
73
  </td>
74
74
  </tr>
@@ -76,13 +76,13 @@
76
76
  <td>
77
77
  <table border='0' cellpadding='0' cellspacing='0' style='margin:0; padding:0;'>
78
78
  <tr>
79
- <td style='padding:0; margin:0; font-size: 20px; color: #ffffff; font-family: Tahoma; vertical-align:top; line-height:25px;' valign='top'>
80
- <a class='not_yahoo' fix='email' href='{{url}}' style='color:#ffffff; text-decoration:none; border:none;'>
79
+ <td style='padding:0; margin:0; font-size: 20px; color: {{foreground_color}}; font-family: Tahoma; vertical-align:top; line-height:25px;' valign='top'>
80
+ <a class='not_yahoo' fix='email' href='{{url}}' style='color:{{foreground_color}}; text-decoration:none; border:none;'>
81
81
  {{dollar}}
82
82
  </a>
83
83
  </td>
84
- <td style='padding:0; margin:0; font-size:14px; text-decoration:underline;padding-left:2px; color: #ffffff; font-family: Tahoma; vertical-align:top;' valign='top'>
85
- <a class='not_yahoosm' fix='email' href='{{url}}' style='color:#ffffff; text-decoration:none; border:none;'>
84
+ <td style='padding:0; margin:0; font-size:14px; text-decoration:underline;padding-left:2px; color: {{foreground_color}}; font-family: Tahoma; vertical-align:top;' valign='top'>
85
+ <a class='not_yahoosm' fix='email' href='{{url}}' style='color:{{foreground_color}}; text-decoration:none; border:none;'>
86
86
  {{cents}}
87
87
  </a>
88
88
  </td>
@@ -6,7 +6,7 @@ describe "atpay_buttons" do
6
6
  let(:public_key) { '06zK82iu9NUUMmDiZsEvoUH25tbIE6R3R+zPnDK8YGQ=' }
7
7
  let(:private_key) { 'plBs9X+Zvr65z6iCa0oLNdAEGYZ85Dzf74Qy1yPTris=' }
8
8
  let(:options) { {partner_id: 1, public_key: public_key, private_key: private_key, amount: '12', env: :sandbox, user_data: 'aaaaaaaa'} }
9
- let(:cli_input) { "bin/atpay_buttons --amount 5.0 --private-key #{private_key} --public-key #{public_key} --partner-id #{options[:partner_id]} --subject subject --image-url imageurl --color color --title title --wrap false --env sandbox --input #{file_info}" }
9
+ let(:cli_input) { "bin/atpay_buttons --amount 5.0 --private-key #{private_key} --public-key #{public_key} --partner-id #{options[:partner_id]} --subject subject --image-url imageurl --background-color color --foreground-color color --title title --wrap false --env sandbox --input #{file_info}" }
10
10
  let(:cli_output) {`#{cli_input}`}
11
11
 
12
12
  describe "button creation" do
@@ -8,7 +8,7 @@ describe AtPay::Button::Template do
8
8
 
9
9
  describe "#new" do
10
10
  it "adds the provided options to the defaults" do
11
- subject.instance_eval{ @options }.keys.sort.must_equal [:subject, :title, :color, :image, :processor, :destination, :templates, :email, :amount, :wrap].sort
11
+ subject.instance_eval{ @options }.keys.sort.must_equal [:subject, :title, :background_color, :foreground_color, :image, :processor, :destination, :templates, :email, :amount, :wrap, :wrap_text].sort
12
12
  end
13
13
  end
14
14
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atpay_buttons
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: