# give/4.16.9/src/Donations/Actions/GeneratePurchaseKey.php

GiveWP – Donation Plugin and Fundraising Platform, version 4.16.9. 19 lines.

- Page: https://pluginprobe.com/plugins/give/4.16.9/code/src/Donations/Actions/GeneratePurchaseKey.php
- Raw: https://pluginprobe.com/plugins/give/4.16.9/raw/src/Donations/Actions/GeneratePurchaseKey.php
- Modified: 2022-03-31T22:56:06+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/give/4.16.9/code/src/Donations/Actions/GeneratePurchaseKey.php#L10-L20`.

```php
<?php

namespace Give\Donations\Actions;

class GeneratePurchaseKey {
    /**
     * @since 2.19.6
     *
     * @param string $email
     * @return string
     */
    public function __invoke($email)
    {
        $auth_key = defined('AUTH_KEY') ? AUTH_KEY : '';

        return strtolower(md5($email . date('Y-m-d H:i:s') . $auth_key . uniqid('give', true)));
    }
}

```
