@@ -267,12 +267,6 @@ class="btn btn-primary me-2 waves-effect waves-light" value="true">Save
267
267
<h5 class="card-header text-center">Stripe</h5>
268
268
<div class="card-text text-center">
269
269
<label>Customize your stripe settings here. 
</label><br>
270
- <label>Currency: This shall be your currency ISO (<a
271
- href="https://stripe.com/docs/currencies#presentment-currencies">Here you can
272
- find a list</a>).</label><br>
273
- <label>Price: This shall be the price per 1 coin (This shall be cents EX 1000 = 1
274
- <?= strtoupper (SettingsManager::getSetting ('payments_currency ' )) ?> ).
275
- </label><br>
276
270
<label>Public Key: This shall be the publishable key that you can get from <a
277
271
href="https://dashboard.stripe.com/apikeys">here</a>.</label><br>
278
272
<label>Secret Key: This shall be the secret key that you can get from <a
@@ -306,38 +300,157 @@ class="btn btn-primary me-2 waves-effect waves-light" value="true">Save
306
300
307
301
</div>
308
302
</div>
309
- <div class="form-group col-md-1 ">
310
- <label class="control-label">Currency </label>
303
+ <div class="form-group col-md-4 ">
304
+ <label class="control-label">Public Key </label>
311
305
<div>
312
306
<input type="text" required="" class="form-control"
313
- name="stripe:stripe_currency "
314
- value="<?= strtoupper ( SettingsManager::getSetting ('payments_currency ' ) ) ?> ">
307
+ name="stripe:public_key "
308
+ value="<?= SettingsManager::getSetting ('stripe_publishable_key ' ) ?> ">
315
309
</div>
316
310
</div>
317
- <div class="form-group col-md-1 ">
318
- <label class="control-label">Price </label>
311
+ <div class="form-group col-md-4 ">
312
+ <label class="control-label">Secret Key </label>
319
313
<div>
320
- <input type="text" required="" class="form-control"
321
- name="stripe:coin_per_balance"
322
- value="<?= SettingsManager::getSetting ('coin_per_balance ' ) ?> ">
314
+ <input type="password" required="" class="form-control"
315
+ name="stripe:private_key"
316
+ value="<?= SettingsManager::getSetting ('stripe_secret_key ' ) ?> ">
317
+ </div>
318
+ </div>
319
+ <br>
320
+
321
+ </div>
322
+ <br>
323
+ <div class="mt-2 text-center">
324
+ <button type="submit" name="update_settings"
325
+ class="btn btn-primary me-2 waves-effect waves-light" value="true">Save
326
+ changes</button>
327
+ <a href="/admin" class="btn btn-label-secondary waves-effect">Cancel</a>
328
+ </div>
329
+ </form>
330
+ </div>
331
+ </div>
332
+ <div class="card mb-4">
333
+ <h5 class="card-header text-center">PayPal</h5>
334
+ <div class="card-text text-center">
335
+ <label>Customize your paypal settings here. 
</label><br>
336
+ <label>Client ID: This shall be the publishable key that you can get from <a
337
+ href="https://developer.paypal.com/dashboard/applications/sandbox">here</a>.</label><br>
338
+ <label>Secret Key: This shall be the secret key that you can get from <a
339
+ href="https://developer.paypal.com/dashboard/applications/sandbox">here</a>.</label>
340
+ <p></p>
341
+ </div>
342
+ <hr class="my-0">
343
+ <div class="card-body">
344
+ <form action="/admin/settings/paypal" method="GET">
345
+ <div class="row">
346
+ <div class="form-group col-md-2">
347
+ <label class="control-label">Status</label>
348
+ <div>
349
+ <?php
350
+ if (SettingsManager::getSetting ('enable_paypal ' ) == 'true ' ) {
351
+ ?>
352
+ <select class="form-control" name="paypal:enabled">
353
+ <option value="true">Enabled</option>
354
+ <option value="false">Disabled</option>
355
+ </select>
356
+ <?php
357
+ } else {
358
+ ?>
359
+ <select class="form-control" name="paypal:enabled">
360
+ <option value="false">Disabled</option>
361
+ <option value="true">Enabled</option>
362
+ </select>
363
+ <?php
364
+ }
365
+ ?>
366
+
323
367
</div>
324
368
</div>
325
369
<div class="form-group col-md-4">
326
- <label class="control-label">Public Key </label>
370
+ <label class="control-label">Client ID </label>
327
371
<div>
328
372
<input type="text" required="" class="form-control"
329
- name="stripe:public_key "
330
- value="<?= SettingsManager::getSetting ('stripe_publishable_key ' ) ?> ">
373
+ name="paypal:client_id "
374
+ value="<?= SettingsManager::getSetting ('paypal_client_id ' ) ?> ">
331
375
</div>
332
376
</div>
333
377
<div class="form-group col-md-4">
334
- <label class="control-label">Secret Key </label>
378
+ <label class="control-label">Secret key </label>
335
379
<div>
336
380
<input type="password" required="" class="form-control"
337
- name="stripe:private_key"
338
- value="<?= SettingsManager::getSetting ('stripe_secret_key ' ) ?> ">
381
+ name="paypal:secret_key"
382
+ value="<?= SettingsManager::getSetting ('paypal_client_secret ' ) ?> ">
383
+ </div>
384
+ </div>
385
+ <br>
386
+
387
+ </div>
388
+ <br>
389
+ <div class="mt-2 text-center">
390
+ <button type="submit" name="update_settings"
391
+ class="btn btn-primary me-2 waves-effect waves-light" value="true">Save
392
+ changes</button>
393
+ <a href="/admin" class="btn btn-label-secondary waves-effect">Cancel</a>
394
+ </div>
395
+ </form>
396
+ </div>
397
+ </div>
398
+ <div class="card mb-4">
399
+ <h5 class="card-header text-center">Payments</h5>
400
+ <div class="card-text text-center">
401
+ <label>Customize your payments settings here. 
</label><br>
402
+ <label>Currency: This shall be your currency ISO (<a
403
+ href="https://stripe.com/docs/currencies#presentment-currencies">Here you can
404
+ find a list</a>).</label><br>
405
+ <label>Price: This shall be the price per 1 coin (This shall be cents EX 1000 = 1
406
+ <?= strtoupper (SettingsManager::getSetting ('payments_currency ' )) ?> ).
407
+ </label><br>
408
+ <p></p>
409
+ </div>
410
+ <hr class="my-0">
411
+ <div class="card-body">
412
+ <form action="/admin/settings/payments" method="GET">
413
+ <div class="row">
414
+ <div class="form-group col-md-4">
415
+ <label class="control-label">Status</label>
416
+ <div>
417
+ <?php
418
+ if (SettingsManager::getSetting ('allow_payments ' ) == 'true ' ) {
419
+ ?>
420
+ <select class="form-control" name="payments:enabled">
421
+ <option value="true">Enabled</option>
422
+ <option value="false">Disabled</option>
423
+ </select>
424
+ <?php
425
+ } else {
426
+ ?>
427
+ <select class="form-control" name="payments:enabled">
428
+ <option value="false">Disabled</option>
429
+ <option value="true">Enabled</option>
430
+ </select>
431
+ <?php
432
+ }
433
+ ?>
434
+
435
+ </div>
436
+ </div>
437
+ <div class="form-group col-md-4">
438
+ <label class="control-label">Currency</label>
439
+ <div>
440
+ <input type="text" required="" class="form-control"
441
+ name="payments:payments_currency"
442
+ value="<?= strtoupper (SettingsManager::getSetting ('payments_currency ' )) ?> ">
443
+ </div>
444
+ </div>
445
+ <div class="form-group col-md-4">
446
+ <label class="control-label">Price</label>
447
+ <div>
448
+ <input type="text" required="" class="form-control"
449
+ name="payments:coin_per_balance"
450
+ value="<?= SettingsManager::getSetting ('coin_per_balance ' ) ?> ">
339
451
</div>
340
452
</div>
453
+
341
454
<br>
342
455
343
456
</div>
0 commit comments