Payonline HCS. Payment acceptance module for housing and communal services

    Foreword: I am not an employee of the Payonline payment system (our customers have chosen this payment system), therefore I do not post this post in the “I PR” hub. The purpose of this post is to popularize Drupal. If at least one person uses this module, I will consider my mission accomplished.

    The module features are very prosaic:

    1. Page and block with a form for entering user data:

    • account number;
    • apartment number (optionally, to verify the correctness of entering the personal account number);
    • amount of payment;
    • amount and type of insurance, amount of interest;

    Payment entry form


    2. Module administration

    2.1 View Payments



    2.2 View / add / export payment bundles



    2.3 Export of payments for the period



    2.3 Module configuration



    A little bit about how the module works.


    • If the resident correctly entered the personal account number, the order number (OrderID) is generated and he goes to the payment page on the payment system website;
    • If the payment was successful, the payment system on callbackUrl (http: // your-site-address / payonline-hcs / confirm) sends a request for payment confirmation on your site.


    After confirming the payment, the administrator can form payment packets from the accepted payments. Only payments that were not previously included in other bundles fall into the new payment package. This feature is implemented for the convenience of exporting payments to the software of a management company.

    Export of payments from a pack and for a certain period (without reference to a specific bundle) is possible, so far, only in CSV format.

    The format of the uploaded file (columns):

    • id;
    • HP number
    • Account number;
    • amount of payment;
    • date and time of acceptance of payment on the site;
    • date and time of acceptance of payment in the payment system;
    • amount of home insurance;
    • amount of liability insurance;
    • amount of full insurance;
    • penalty amount;
    • payment commission

    Checking the correctness of entering the personal account number by apartment number


    By default, this feature is disabled in the settings.
    Before you enable this function, you must fill out a directory-correspondence of personal account numbers to apartment numbers. Otherwise, if the verification function is enabled and the directory is empty or it does not have an complete database of all personal accounts, then the user will be given an error that the personal account number is incorrect.
    The directory is filled in using a special form located in the “Payonline Configuration” -> “Directory with Apartment Numbers” section.
    On the "input" to fill out the directory you need a text file with delimiters. Required file structure:
    "0505252";"1"
    

    where the first field is the personal account number, the second field is the apartment number.



    Do not forget to configure access rights to the module. Here is an example of the correct configuration of access rights to the module:


    The module is under BSD licenses. Github source code .

    Perhaps that's all. There will be questions, ask in the comments.

    PS
    For the development of this module for our customer, I took 0 rubles, with the aim to share it with the community. I think it’s good practice to share “best practices” if the customer got them for free. If the nth amount is charged for development, my hand does not rise to spread it in the public domain. Yes, and customers, I think, will not like this approach either.

    UPD from 01/27/2014
    Updated the module to version 1.0.1. List of changes:
    • added a page with statistics in the administrative part;
    • added page and block with the ability to check payment status;
    • small changes in table structures, all rows are translated;
    • in the payment list for the admin, the number of the payment pack is now indicated, if any.

    UPD from 01.29.2014
    Updated the module to version 1.0.2.
    UPD 03.03.2014
    Updated the module to version 1.0.3. See change_log.txt for details.
    UPD from 09/02/2014
    I did the code refactoring, removed the global variables.
    UPD from 10.26.2014
    Updated the module to version 1.0.7.
    Now, the commission amount can be omitted from the total payment amount.
    Added the ability to manually select payments for export or to add to a bundle of payments.
    Removed some errors, refactored the code.
    UPD from 03/20/2015
    Updated to version 1.0.7.1

    Only registered users can participate in the survey. Please come in.

    Do I need to port a similar module for other payment systems?

    • 68.4% Yes, that would be nice 39
    • 14% No, I think the module is useless 8
    • 17.5% The module needs to be improved 10

    Also popular now: