GeneratePurchaseKey.php
4 years ago
LoadDonationAdminOptions.php
8 months ago
LoadDonationDetailsAssets.php
11 months ago
LoadDonationsListTableAssets.php
8 months ago
GeneratePurchaseKey.php
19 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Give\Donations\Actions; |
| 4 | |
| 5 | class GeneratePurchaseKey { |
| 6 | /** |
| 7 | * @since 2.19.6 |
| 8 | * |
| 9 | * @param string $email |
| 10 | * @return string |
| 11 | */ |
| 12 | public function __invoke($email) |
| 13 | { |
| 14 | $auth_key = defined('AUTH_KEY') ? AUTH_KEY : ''; |
| 15 | |
| 16 | return strtolower(md5($email . date('Y-m-d H:i:s') . $auth_key . uniqid('give', true))); |
| 17 | } |
| 18 | } |
| 19 |