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 {
$payment = $mollie->payments->create();
# Keep payment in database
PHDB::insert("payments",
array(
$paymentArray = array(
'payment' => array(
'id' => $payment->id,
'currency' => "EUR",
......@@ -66,8 +65,9 @@ class PaymentController extends CommunecterController {
),
'orderId' => "$orderId",
'mode' => $_POST["mode"]
)
);
Yii::app()->mongodb->selectCollection("payments")->insert($paymentArray);
return Rest::json(array('url' => $payment->getCheckoutUrl()));
}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