Commit 4addf946 authored by thomas craipeau's avatar thomas craipeau
Browse files

replace PHDB::insert

parent e859d61d
...@@ -48,8 +48,7 @@ class PaymentController extends CommunecterController { ...@@ -48,8 +48,7 @@ class PaymentController extends CommunecterController {
$payment = $mollie->payments->create(); $payment = $mollie->payments->create();
# Keep payment in database # Keep payment in database
PHDB::insert("payments", $paymentArray = array(
array(
'payment' => array( 'payment' => array(
'id' => $payment->id, 'id' => $payment->id,
'currency' => "EUR", 'currency' => "EUR",
...@@ -66,8 +65,9 @@ class PaymentController extends CommunecterController { ...@@ -66,8 +65,9 @@ class PaymentController extends CommunecterController {
), ),
'orderId' => "$orderId", 'orderId' => "$orderId",
'mode' => $_POST["mode"] 'mode' => $_POST["mode"]
) );
); Yii::app()->mongodb->selectCollection("payments")->insert($paymentArray);
return Rest::json(array('url' => $payment->getCheckoutUrl())); return Rest::json(array('url' => $payment->getCheckoutUrl()));
}else{ }else{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment