payment.kv
1 <Payment>: 2 name: "payment" 3 id: id_payment_screen 4 payment_plan_id: "" 5 MDTabs: 6 id: tab_panel 7 tab_display_mode:'text' 8 Tab: 9 title: app.tr._("Payment") 10 id: id_payment plan 11 padding: "12dp" 12 spacing: "12dp" 13 BoxLayout: 14 ScrollView: 15 bar_width:0 16 do_scroll_x: False 17 BoxLayout: 18 spacing: dp(5) 19 padding: dp(5) 20 size_hint_y: None 21 height: self.minimum_height 22 orientation: "vertical" 23 ProductCategoryLayout: 24 MDCard: 25 orientation: "vertical" 26 padding: "8dp" 27 spacing: "12dp" 28 size_hint: None, None 29 size: "560dp", "40dp" 30 pos_hint: {"center_x": .5, "center_y": .5} 31 MDLabel: 32 text: f"You have {app.encrypted_messages_per_month} messages left" 33 bold: True 34 halign:'center' 35 size_hint_y: None 36 pos_hint: {"center_x": .5, "center_y": .5} 37 38 MDCard: 39 orientation: "vertical" 40 padding: "8dp" 41 spacing: "12dp" 42 size_hint: None, None 43 size: "560dp", "300dp" 44 md_bg_color: [1, 0.6, 0,0.5] 45 pos_hint: {"center_x": .5, "center_y": .5} 46 MDLabel: 47 text: "Free" 48 bold: True 49 halign:'center' 50 size_hint_y: None 51 pos_hint: {"center_x": .5, "center_y": .5} 52 MDRectangleFlatIconButton: 53 text: "[Currently this plan is active.]" 54 icon: 'shield-check' 55 line_color: 0, 0, 0, 0 56 text_color: 'ffffff' 57 pos_hint: {"center_x": .5, "center_y": .5} 58 font_size: '18sp' 59 MDSeparator: 60 height: "1dp" 61 MDLabel: 62 text: "You can get zero encrypted message per month" 63 halign:'center' 64 bold: True 65 MDCard: 66 orientation: "vertical" 67 padding: "8dp" 68 spacing: "12dp" 69 size_hint: None, None 70 size: "560dp", "300dp" 71 md_bg_color: [0, 0.6, 0.8,0.8] 72 pos_hint: {"center_x": .5, "center_y": .5} 73 payment_plan_id: "sub_standard" 74 MDLabel: 75 text: "Standard" 76 bold: True 77 halign:'center' 78 size_hint_y: None 79 MDSeparator: 80 height: "1dp" 81 MDLabel: 82 text: "You can get 100 encrypted message per month" 83 halign:'center' 84 MDRaisedButton: 85 text: "Get it now" 86 theme_text_color: 'Primary' 87 md_bg_color: [1, 1, 1,1] 88 pos_hint: {'center_x': .5} 89 on_release:app.open_payment_layout(root.payment_plan_id) 90 MDCard: 91 orientation: "vertical" 92 padding: "8dp" 93 spacing: "12dp" 94 size_hint: None, None 95 size: "560dp", "300dp" 96 md_bg_color: [1, 0.6, 0.8,0.5] 97 pos_hint: {"center_x": .5, "center_y": .5} 98 payment_plan_id: "sub_premium" 99 MDLabel: 100 text: "Premium" 101 bold: True 102 halign:'center' 103 size_hint_y: None 104 MDSeparator: 105 height: "1dp" 106 MDLabel: 107 text: "You can get 1000 encrypted message per month" 108 halign:'center' 109 MDRaisedButton: 110 text: "Get it now" 111 theme_text_color: 'Primary' 112 md_bg_color: [1, 1, 1,1] 113 pos_hint: {'center_x': .5} 114 on_release:app.open_payment_layout(root.payment_plan_id) 115 Tab: 116 title: app.tr._("Extra-Messages") 117 id: id_payment_tab 118 BoxLayout: 119 ScrollView: 120 bar_width:0 121 do_scroll_x: False 122 BoxLayout: 123 spacing: dp(8) 124 padding: dp(5) 125 size_hint_y: None 126 height: self.minimum_height 127 orientation: "vertical" 128 ProductCategoryLayout: 129 category_text: "Extra-Messages" 130 ProductLayout: 131 heading_text: "100 Encrypted messages " 132 price_text: "$0.99" 133 source: app.image_path + "/payment/buynew1.png" 134 description_text: "Buy extra one hundred encrypted messages!" 135 product_id: "SKUGASBILLING" 136 ProductLayout: 137 heading_text: "1000 Encrypted messages " 138 price_text: "$1.49" 139 source: app.image_path + "/payment/buynew1.png" 140 description_text: "Buy extra one thousand encrypted messages!" 141 product_id: "SKUUPGRADECAR" 142 <ProductCategoryLayout@BoxLayout>: 143 size_hint_y: None 144 height: self.minimum_height 145 category_text:"" 146 147 orientation: "vertical" 148 spacing: 2 149 150 #category area 151 Category: 152 text_: root.category_text 153 154 <Category>: 155 canvas: 156 Color: 157 rgba: 1,1,1,1 158 Rectangle: 159 pos: self.pos 160 size: self.size 161 text_: "" 162 size_hint_y: None 163 height: dp(30) 164 Widget: 165 size_hint_x: None 166 width: dp(20) 167 MDLabel: 168 text: root.text_ 169 font_size: sp(15) 170 <ProductLayout>: 171 heading_text: "" 172 price_text: "" 173 source: "" 174 description_text: "" 175 176 product_id: "" 177 178 canvas: 179 Color: 180 rgba: 1,1,1,1 181 Rectangle: 182 pos: self.pos 183 size: self.size 184 185 size_hint_y: None 186 height: dp(200) 187 orientation: "vertical" 188 189 #heading area 190 BoxLayout: 191 size_hint_y: 0.3 192 #text heading 193 BoxLayout: 194 Widget: 195 size_hint_x: None 196 width: dp(20) 197 MDLabel: 198 text: root.heading_text 199 bold: True 200 201 #price text 202 BoxLayout: 203 size_hint_x:.3 204 MDLabel: 205 text: root.price_text 206 bold: True 207 halign: "right" 208 theme_text_color: "Custom" 209 text_color: 0,0,1,1 210 Widget: 211 size_hint_x: None 212 width: dp(20) 213 214 #details area 215 BoxLayout: 216 size_hint_y: 0.3 217 Widget: 218 size_hint_x: None 219 width: dp(20) 220 221 #image area 222 AnchorLayout: 223 size_hint_x: None 224 width: self.height 225 BoxLayout: 226 canvas: 227 Color: 228 rgba: 1,1,1,1 229 Ellipse: 230 size: self.size 231 pos: self.pos 232 source: root.source 233 Widget: 234 size_hint_x: None 235 width: dp(10) 236 237 #description text 238 BoxLayout: 239 #size_hint_x: 1 240 MDLabel: 241 text: root.description_text 242 font_size: sp(15) 243 #Button Area 244 BoxLayout: 245 size_hint_y: 0.4 246 Widget: 247 248 AnchorLayout: 249 anchor_x: "right" 250 MDRaisedButton: 251 elevation_normal: 5 252 text: "BUY" 253 on_release: 254 #print(app) 255 app.open_payment_layout(root.product_id) 256 257 Widget: 258 size_hint_x: None 259 width: dp(20) 260 261 <ListItemWithLabel>: 262 on_release: app.initiate_purchase(self.method_name) 263 recent: False 264 source: "" 265 method_name: "" 266 right_label_text: "Recent" if self.recent else "" 267 268 ImageLeftWidget: 269 source: root.source 270 271 RightLabel: 272 text: root.right_label_text 273 theme_text_color: "Custom" 274 text_color: 0,0,0,0.5 275 font_size: sp(12) 276 277 <PaymentMethodLayout>: 278 orientation: "vertical" 279 size_hint_y: None 280 height: "200dp" 281 282 BoxLayout: 283 size_hint_y: None 284 height: dp(40) 285 286 Widget: 287 size_hint_x: None 288 width: dp(20) 289 MDLabel: 290 text: "Select Payment Method" 291 font_size: sp(14) 292 bold: True 293 theme_text_color: "Custom" 294 text_color: 0,0,0,.5 295 296 297 ScrollView: 298 299 GridLayout: 300 cols: 1 301 size_hint_y:None 302 height:self.minimum_height 303 304 ListItemWithLabel: 305 source: app.image_path + "/payment/gplay.png" 306 text: "Google Play" 307 method_name: "gplay" 308 recent: True 309 310 ListItemWithLabel: 311 source: app.image_path + "/payment/btc.png" 312 text: "BTC (Currently this feature is not available)" 313 method_name: "btc" 314 theme_text_color: 'Secondary' 315 md_bg_color: [0, 0, 0,1] 316 ListItemWithLabel: 317 source: app.image_path + "/payment/paypal.png" 318 text: "Paypal (Currently this feature is not available)" 319 method_name: "som" 320 theme_text_color: 'Secondary' 321 md_bg_color: [0, 0, 0,1] 322 ListItemWithLabel: 323 source: app.image_path + "/payment/buy.png" 324 text: "One more method" 325 method_name: "omm"