コード例 #1
0
ファイル: Payment.php プロジェクト: vinstah/body
 /**
  * Update the payment status inclusing saving any errors from the gateway
  * 
  * @see PaymentProcessor::capture()
  * 
  * @param PaymentGateway_Result Result from the payment gateway after processing
  * @return Int Payment ID
  */
 public function updateStatus(PaymentGateway_Result $result)
 {
     //Use the gateway result to update the payment
     $this->Status = $result->getStatus();
     $this->HTTPStatus = $result->getHTTPResponse()->getStatusCode();
     $errors = $result->getErrors();
     foreach ($errors as $code => $message) {
         $error = new Payment_Error();
         $error->ErrorCode = $code;
         $error->ErrorMessage = $message;
         $error->PaymentID = $this->ID;
         $error->write();
     }
     return $this->write();
 }
コード例 #2
0
ファイル: PaymentGateway.php プロジェクト: vinstah/body
 public function __construct($response = null, $errors = null)
 {
     parent::__construct(self::INCOMPLETE, $response, $errors);
 }