mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Add tests
This commit is contained in:
parent
4c5f0552f9
commit
4cecb908e6
3 changed files with 119 additions and 14 deletions
|
@ -60,12 +60,13 @@ class PayPalRequestIdRepository {
|
|||
* @param string $request_id The ID.
|
||||
*/
|
||||
public function set( string $key, string $request_id ): void {
|
||||
$all = $this->all();
|
||||
$all[ $key ] = array(
|
||||
$all = $this->all();
|
||||
$day_in_seconds = 86400;
|
||||
$all[ $key ] = array(
|
||||
'id' => $request_id,
|
||||
'expiration' => time() + 10 * DAY_IN_SECONDS,
|
||||
'expiration' => time() + 10 * $day_in_seconds,
|
||||
);
|
||||
$all = $this->cleanup( $all );
|
||||
$all = $this->cleanup( $all );
|
||||
update_option( self::KEY, $all );
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue