本文整理汇总了PHP中logger::addInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP logger::addInfo方法的具体用法?PHP logger::addInfo怎么用?PHP logger::addInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类logger
的用法示例。
在下文中一共展示了logger::addInfo方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: processTransaction
/**
* Given a paymillTransaction response, as an array, prform desired operations
*
* @param array $autWS
* @param PagosonlineMethod $paymentMethod Payment method
*
* @return PagosonlineManager Self object
*
* @throws PaymentException
*/
private function processTransaction($autWS, PagosonlineMethod $paymentMethod)
{
/**
* Payment paid done
*
* Paid process has ended ( No matters result )
*/
$this->paymentEventDispatcher->notifyPaymentOrderDone($this->paymentBridge, $paymentMethod);
$this->logger->addInfo($paymentMethod->getPaymentName() . 'processTransaction', get_object_vars($autWS));
/**
* if pagosonline return code 15 o 9994 the order status is pending
*/
if (in_array($autWS->codigoRespuesta, array('15', '9994'))) {
//payment is still pending nothing to do
} elseif ($autWS->codigoRespuesta == 1) {
$this->paymentEventDispatcher->notifyPaymentOrderSuccess($this->paymentBridge, $paymentMethod);
} else {
$this->paymentEventDispatcher->notifyPaymentOrderFail($this->paymentBridge, $paymentMethod);
throw new PaymentException();
}
/**
* Log the response of gateway
*/
return $this;
}
示例2: checkTransactionStatus
public function checkTransactionStatus($transactionId)
{
//All information of transaction response
$statusTransactionWS = $this->pagosonlineComm->consultarEstadoTransaccion($this->accountId, $transactionId);
$paymentMethod = new PagosonlineGatewayMethod();
$paymentMethod->setPagosonlineGatewayTransactionId($statusTransactionWS->transaccionId);
$paymentMethod->setStatus($statusTransactionWS->estadoId);
$paymentMethod->setReference($statusTransactionWS->referencia);
$paymentMethod->setAmount($statusTransactionWS->valor);
$this->logger->addInfo($paymentMethod->getPaymentName() . 'processTransactionCheck', get_object_vars($statusTransactionWS));
/**
* if pagosonline return code 15 o 9994 the order status is pending
*/
$this->paymentEventDispatcher->notifyPaymentOrderLoad($this->paymentBridge, $paymentMethod);
if ($statusTransactionWS->codigoRespuesta == 1) {
$this->paymentEventDispatcher->notifyPaymentOrderSuccess($this->paymentBridge, $paymentMethod);
} elseif (!in_array($statusTransactionWS->codigoRespuesta, array(15, 9994))) {
//status 15 or 9994 payment is still in pending nothing to do
$this->paymentEventDispatcher->notifyPaymentOrderFail($this->paymentBridge, $paymentMethod);
}
}
示例3: processTransaction
/**
* Given a Dineromail response, as a SimpleXMLElement, perform desired operations
*
* @param SimpleXMLElement $xml Dineromail response
* @return DineromailManager Self object
*/
public function processTransaction($xml)
{
$paymentMethod = new DineromailMethod();
$this->logger->addInfo($paymentMethod->getPaymentName() . 'processTransaction: ' . $xml->asXML());
switch ($status = $xml->ESTADO) {
case self::STATUS_PENDING:
break;
case self::STATUS_ACCEPTED:
case self::STATUS_DENIED:
$paymentMethod->setDineromailTransactionId($xml->ID);
$paymentMethod->setAmount($xml->MONTO);
$this->paymentEventDispatcher->notifyPaymentOrderLoad($this->paymentBridge, $paymentMethod);
break;
default:
}
if ($status == self::STATUS_ACCEPTED) {
$this->paymentEventDispatcher->notifyPaymentOrderSuccess($this->paymentBridge, $paymentMethod);
}
if ($status == self::STATUS_DENIED) {
$this->paymentEventDispatcher->notifyPaymentOrderFail($this->paymentBridge, $paymentMethod);
}
return $this;
}
示例4: processTransaction
/**
*
* @param $result \soap response
* @param DineromailApiMethod $paymentMethod Payment method
*
* @throws \PaymentSuite\PaymentCoreBundle\Exception\PaymentException
* @return DineromailApiMethod Self object
*
*/
private function processTransaction($result, DineromailApiMethod $paymentMethod)
{
$this->logger->addInfo($paymentMethod->getPaymentName() . 'processTransaction Result', get_object_vars($result));
$paymentMethod->setDineromailApiReference($result->MerchantTransactionId);
$paymentMethod->setDineromailApiTransactionId($result->TransactionId);
/**
* Payment paid done
*
* Paid process has ended ( No matters result )
*/
$this->paymentEventDispatcher->notifyPaymentOrderDone($this->paymentBridge, $paymentMethod);
switch ($result->Status) {
case 'OK':
case 'COMPLETED':
$this->paymentEventDispatcher->notifyPaymentOrderSuccess($this->paymentBridge, $paymentMethod);
break;
case 'PENDING':
break;
default:
$this->paymentEventDispatcher->notifyPaymentOrderFail($this->paymentBridge, $paymentMethod);
throw new PaymentException();
}
return $this;
}