예제 #1
0
 public function completePurchase($data, Payment $payment)
 {
     if ($payment->isFinished()) {
         return;
     }
     throw new RentException('Missing payment');
 }
예제 #2
0
 public function createPayment(CompletedPayment $completePayment)
 {
     $payment = new Payment();
     if ($completePayment->isSuccessful()) {
         $payment->confirm();
         return $payment;
     }
     $payment->deny();
     return $payment;
 }