/**
 * Accepts payment made by user
 *
 * This function is executed by wpjb_payment_accept filter in Wpjb_Model_Payment::accepted()
 *
 * @see wpjb_payment_accept filter
 * @see Wpjb_Model_Payment::accepted();
 *
 * @param boolean $accepted
 * @param Wpjb_Model_Payment $payment Payment object
 * @return boolean True if payment was accepted properly, false otherwise
 */
function custom_payment_type_accept($accepted, $payment)
{
    if ($accepted === true) {
        // most likely one of default payment types
        return true;
    }
    $pricing = new Wpjb_Model_Pricing($payment->pricing_id);
    $list = new Wpjb_List_Pricing();
    $listing = $list->getBy("id", $pricing->price_for);
    if (is_null($listing) || $listing['id'] != 210) {
        return $accepted;
    }
    $payment->log("Success!!!");
    return true;
}