function _uc_stripe_create_idempotency_key in Ubercart Stripe 7.3
Creates an idempotency key to prevent duplicate requests in Stripe API.
Parameters
string $key: The string used to make a key.
Return value
string The idempotency key.
2 calls to _uc_stripe_create_idempotency_key()
- uc_stripe_renew in ./
uc_stripe.module - Handle renewing a recurring fee, called by uc_recurring
- _uc_stripe_confirm_payment in ./
uc_stripe.module - Ajax page callback for callback uc_stripe/ajax/confirm_payment page This is used to send payment and intent status back to JS client
File
- ./
uc_stripe.module, line 1284 - A stripe.js PCI-compliant payment gateway Forked from Bitcookie's work (thanks!) which was posted at http://bitcookie.com/blog/pci-compliant-ubercart-and-stripe-js from discussion in the uc_stripe issue queue, https://www.drupal.org/node/1467886
Code
function _uc_stripe_create_idempotency_key($key) {
$idempotency_key = hash('sha256', $key);
return $idempotency_key;
}