original_string: 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();
      }
code: 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();
      }
code_tokens: 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 ( ) ; }
docstring: Register a refunded amount against a purchase.
  
  @param \Hamjoint\Mustard\Commerce\Purchase $purchase
  @param float $amount
  @return void
docstring_tokens: Register a refunded amount against a purchase .