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