コード例 #1
0
ファイル: TransactionResponse.php プロジェクト: petflow/litle
 /**
  * Create a Response
  *
  * When creating a transaction response, the constructor will look 
  * for the appropriate fields in the raw response XML and then parse
  * them out into the corresponding members of this class.
  */
 public function __construct($raw_response_data, $node_name, $mode = 'sandbox')
 {
     $this->xml_node_name = $node_name;
     $this->setCode(\XMLParser::getNode($raw_response_data, 'response'));
     $this->order_id = \XMLParser::getAttribute($raw_response_data, $this->xml_node_name, 'id');
     $this->litle_txn_id = \XMLParser::getNode($raw_response_data, 'litleTxnId');
     $this->time = (new \DateTime(\XMLParser::getNode($raw_response_data, 'responseTime')))->format('Y-m-d H:i:s');
     $this->debug = $raw_response_data;
     $this->mode = $mode;
 }