當前位置: 首頁>>代碼示例>>PHP>>正文


PHP payment::getError方法代碼示例

本文整理匯總了PHP中payment::getError方法的典型用法代碼示例。如果您正苦於以下問題:PHP payment::getError方法的具體用法?PHP payment::getError怎麽用?PHP payment::getError使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在payment的用法示例。


在下文中一共展示了payment::getError方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: u

                $app->render(new u('payment.flexiload.request'));
            });
            $app->post('flexiload/confirm/', function () use($app) {
                $app->view->setData('form_action', BASEURL . "dashboard/payment/add/flexiload/confirm/process");
                $app->view->setData('form_title', "Are you confirm?");
                $app->view->setData('payment_amount', $app->request()->post('payment_amount'));
                $app->view->setData('payment_memo', $app->request()->post('payment_memo'));
                $app->view->setData('customer_id', $app->request()->post('customer_id'));
                $app->render(new u('payment.flexiload.request_confirm'));
            });
            $app->get('/flexiload/confirm/process', function () use($app) {
                $payment = new payment();
                $payment->who_is_paying = L::getSessionValue('usid');
                $payment->who_is_paying = $app->request()->post();
                $payment->payment_type = 'return';
                $payment->save();
                if ($payment->fails()) {
                    $app->view->setData('error', 1);
                    $app->view->setData('msg', $payment->getError());
                    $app->render(new u('msg'));
                } else {
                    $app->view->setData('success', 1);
                    $app->view->setData('msg', "Succesfully Payment  Returned.");
                    $app->render(new u('msg'));
                }
            });
            //Flexiload End
        });
        //End return payment operation
    });
});
開發者ID:bogiesoft,項目名稱:Slim_PHP_Project,代碼行數:31,代碼來源:payment_route.php


注:本文中的payment::getError方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。