2018-07-28 04:09:21 -07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models\Traits;
|
|
|
|
|
|
|
|
use App\Models\User;
|
|
|
|
|
2018-07-28 04:32:29 -07:00
|
|
|
/**
|
|
|
|
* This trait allows models to have a callback after their checkout gets accepted or declined.
|
|
|
|
*
|
|
|
|
* @author Till Deeke <kontakt@tilldeeke.de>
|
|
|
|
*/
|
2021-06-10 13:15:52 -07:00
|
|
|
trait Acceptable
|
|
|
|
{
|
2018-07-28 04:09:21 -07:00
|
|
|
/**
|
|
|
|
* Run after the checkout acceptance was accepted by the user
|
2021-06-10 13:15:52 -07:00
|
|
|
*
|
2018-07-28 04:09:21 -07:00
|
|
|
* @param User $acceptedBy
|
|
|
|
* @param string $signature
|
|
|
|
*/
|
2021-06-10 13:15:52 -07:00
|
|
|
public function acceptedCheckout(User $acceptedBy, $signature)
|
|
|
|
{
|
|
|
|
}
|
2018-07-28 04:09:21 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Run after the checkout acceptance was declined by the user
|
2021-06-10 13:15:52 -07:00
|
|
|
*
|
2018-07-28 04:09:21 -07:00
|
|
|
* @param User $acceptedBy
|
|
|
|
* @param string $signature
|
2021-06-10 13:15:52 -07:00
|
|
|
*/
|
|
|
|
public function declinedCheckout(User $declinedBy, $signature)
|
|
|
|
{
|
|
|
|
}
|
2018-07-28 04:09:21 -07:00
|
|
|
}
|