示例#1
0
 /**
  * Get sofort status with reason
  * 
  * @return array
  */
 public function getStatusData($rawBody)
 {
     $transactionData = array('status' => 'undefined', 'reason' => 'undefined');
     $notificationSdk = new SofortLibNotification();
     $transactionId = $notificationSdk->getNotification($rawBody);
     if ($transactionId) {
         $transactionDataSdk = new SofortLibTransactionData(Mage::getStoreConfig('payment/paymentnetwork_pnsofortueberweisung/cofiguration_key', Mage::app()->getStore()->getStoreId()));
         $transactionDataSdk->addTransaction($transactionId)->sendRequest();
         $transactionData['status'] = $transactionDataSdk->getStatus();
         $transactionData['reason'] = $transactionDataSdk->getStatusReason();
         $transactionData['amount_refunded'] = $transactionDataSdk->getAmountRefunded();
         $transactionData['transaction_id'] = $transactionId;
     }
     return $transactionData;
 }