original_string: public static function paymentFailed(Purchase $purchase, $amount)
      {
          Log::info("Payment failed ({$purchase->purchaseId})");
  
          $purchase->buyer->sendEmail(
              'Your payment has failed',
              'emails.item.failed',
              [
                  'total' => $amount,
                  'item_name' => $purchase->item->name,
                  'payment_id' => $purchase->purchaseId,
              ]
          );
      }
code: public static function paymentFailed(Purchase $purchase, $amount)
      {
          Log::info("Payment failed ({$purchase->purchaseId})");
  
          $purchase->buyer->sendEmail(
              'Your payment has failed',
              'emails.item.failed',
              [
                  'total' => $amount,
                  'item_name' => $purchase->item->name,
                  'payment_id' => $purchase->purchaseId,
              ]
          );
      }
code_tokens: public static function paymentFailed ( Purchase $ purchase , $ amount ) { Log :: info ( "Payment failed ({$purchase->purchaseId})" ) ; $ purchase -> buyer -> sendEmail ( 'Your payment has failed' , 'emails.item.failed' , [ 'total' => $ amount , 'item_name' => $ purchase -> item -> name , 'payment_id' => $ purchase -> purchaseId , ] ) ; }
docstring: Register a failed amount against a purchase.
  
  @param \Hamjoint\Mustard\Commerce\Purchase $purchase
  @param float $amount
  @return void
docstring_tokens: Register a failed amount against a purchase .