/** * Renders record payment view * * @param int $paymentBasketId * @return string */ public static function displayRecordPaymentForm($paymentBasketId) { // also called in the case of reload of invoicing address: cbpaidApp::loadLang('admin'); $paymentRecorder = new self(); $exists = $paymentBasketId && $paymentRecorder->load((int) $paymentBasketId); if ($exists) { if ($paymentRecorder->authoriseAction('cbsubs.recordpayments')) { $return = $paymentRecorder->renderRecordPaymentForm(Application::MyUser()->getUserId()); } else { $return = CBPTXT::T("You are not authorized to record payments."); } } else { $return = CBPTXT::T("Payment basket not found."); } return $return; }