/**
  * Void a Previously Authorized Payment
  */
 function void()
 {
     if (!$this->get['payment']->void()) {
         // There was an error processing the transaction
         throw new SWUserException("[CC_TRANSACTION_FAILED]");
     }
     if ($this->get['payment']->getStatus() == "Declined") {
         // Transaction was declined
         throw new SWUserException("[CC_VOID_DECLINED]");
     }
     // Update the payment record
     update_PaymentDBO($this->get['payment']);
     // Success
     $this->setMessage(array("type" => "[CC_VOIDED]"));
     $this->reload();
 }
Example #2
0
 /**
  * Update Payment
  */
 function updatePayment()
 {
     update_PaymentDBO($this->paymentDBO);
     log_notice("PSIPNPage::paymentCompleted()", sprintf("Updated Paypal payment.  TXN=%s, Customer=%s", $_POST['txn_id'], $_POST['payer_email']));
 }