2014-01-22 94 views
0

如何正確使用$this->payments->payment_action();函數?使用Codeigniter支付

我得到的是這樣的:

object(stdClass)#137 (5) { 
    ["type"]=> 
    string(14) "local_response" 
    ["status"]=> 
    string(7) "failure" 
    ["response_code"]=> 
    string(3) "000" 
    ["response_message"]=> 
    string(32) "The method called does not exist" 
    ["details"]=> 
    string(27) "No further details provided" 
} 
+0

你想用這個做什麼? –

+0

這是這樣的: $ response = $ this-> payments-> payment_action('gateway_name',$ params); 我不知道我應該放在'$ params'中 –

+0

你檢查了我的答案嗎? –

回答

0

按的問題,您收到某些對象。

例如:在這裏我只是打印對象內容。如果你用db來存儲,那麼你可以用$obj來做。

$obj = $this->payments->payment_action();  
echo "Type = ".$obj->type; 
echo "Status= ".$obj->status; 
echo "Response code= ".$obj->response_code; 
echo "Response Message= ".$obj->response_message; 
echo "Details= ".$obj->details;