This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun getSecretKey(sharedPref: SharedPreferences): SecretKey { | |
val key = sharedPref.getString(AppConstants.secretKeyPref, null) | |
if (key == null) { | |
//generate secure random | |
val secretKey = generateSecretKey() | |
saveSecretKey(sharedPref, secretKey!!) | |
return secretKey | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun getSecretKey(sharedPref: SharedPreferences): SecretKey { | |
val key = sharedPref.getString(AppConstants.secretKeyPref, null) | |
if (key == null) { | |
//generate secure random | |
val secretKey = generateSecreKey() | |
saveSecretKey(sharedPref, secretKey!!) | |
return secretKey | |
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require 'path-to-Stripe.php'; | |
$error = ''; | |
$success = ''; | |
if ($_POST) { | |
Stripe::setApiKey("YOUR-API-KEY"); | |
try { | |
if (!isset($_POST['stripeToken'])) |