public static function paymentRefunded(Purchase $purchase, $amount)
    {
        $purchase->refunded = time();

        $purchase->refundedAmount = $amount;

        $purchase->buyer->sendEmail(
            'You have been refunded',
            'emails.item.refunded',
            [
                'total' => $purchase->refundedAmount,
                'item_name' => $purchase->item->name,
            ]
        );

        $purchase->save();
    }
public static function paymentRefunded(Purchase $purchase, $amount)
    {
        $purchase->refunded = time();

        $purchase->refundedAmount = $amount;

        $purchase->buyer->sendEmail(
            'You have been refunded',
            'emails.item.refunded',
            [
                'total' => $purchase->refundedAmount,
                'item_name' => $purchase->item->name,
            ]
        );

        $purchase->save();
    }
public static function paymentRefunded ( Purchase $ purchase , $ amount ) { $ purchase -> refunded = time ( ) ; $ purchase -> refundedAmount = $ amount ; $ purchase -> buyer -> sendEmail ( 'You have been refunded' , 'emails.item.refunded' , [ 'total' => $ purchase -> refundedAmount , 'item_name' => $ purchase -> item -> name , ] ) ; $ purchase -> save ( ) ; }
Register a refunded amount against a purchase.

@param \Hamjoint\Mustard\Commerce\Purchase $purchase
@param float $amount
@return void
Register a refunded amount against a purchase .