File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed
Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,9 @@ PAYPAL.apps = PAYPAL.apps || {};
1818 id : "hosted_button_id" ,
1919 name : "item_name" ,
2020 number : "item_number" ,
21- lang : "lc"
21+ lang : "lc" ,
22+ recurrence : "p3" ,
23+ period : "t3"
2224 } ,
2325 buttonImgs = {
2426 buynow : "//www.paypalobjects.com/{locale}/i/btn/btn_buynow_{size}.gif" ,
@@ -89,6 +91,12 @@ PAYPAL.apps = PAYPAL.apps || {};
8991 // Subscribe buttons
9092 } else if ( type === "subscribe" ) {
9193 data . add ( "cmd" , "_xclick-subscriptions" ) ;
94+
95+ // TODO: "amount cannot be used in prettyParams since it's overloaded
96+ // Find a better way to do this
97+ if ( data . items . amount && ! data . items . a3 ) {
98+ data . add ( "a3" , data . items . amount . value ) ;
99+ }
92100 // Buy Now buttons
93101 } else {
94102 data . add ( "cmd" , "_xclick" ) ;
Original file line number Diff line number Diff line change @@ -113,11 +113,10 @@ <h2>Subscribe (Small)</h2>
113113 < script src ="../src/paypal-button.js?merchant=6XF3MPZBZV6HU "
114114 data-button ="subscribe "
115115 data-name ="Subscribe! "
116- data-amount ="1.00 "
117116 data-size ="small "
118- data-a3 ="1.00 "
119- data-p3 ="1 "
120- data-t3 ="M "
117+ data-amount ="1.00 "
118+ data-recurrence ="1 "
119+ data-period ="M "
121120 > </ script >
122121 </ div >
123122
@@ -127,7 +126,8 @@ <h2>Subscribe (Large)</h2>
127126 data-button ="subscribe "
128127 data-name ="Subscribe! "
129128 data-amount ="1.00 "
130- data-size ="large "
129+ data-recurrence ="1 "
130+ data-period ="M "
131131 > </ script >
132132 </ div >
133133
You can’t perform that action at this time.
0 commit comments