Skip to content

Bitrix 24 Plugin, will get your store set up with DHFinance in minutes

License

Notifications You must be signed in to change notification settings

citrus-soft/dhf-pay-bitrix

 
 

Installation and configuration instructions

Brief description on installation and configuration

The algorithm for installing and configuring the module after installation

  1. Installation algorithm, if module is not published on the marketplace: http://<website address>/bitrix/admin/update_system_partner.php?addmodule=<module code>:
  • – domen of Bitrix24 portal;
  • - citrus.dhfi; Example link with module code: http://<website address>/bitrix/admin/update_system_partner.php?addmodule=citrus.dhfi;
  1. Client installs module on B24 Box from Bitris marketplace site management:
  • CSPR currency is created automatically. CSPR currency rate can be managed from module configuration Currencies;
  • For the old version of accounts Client creates and configures payment system for payers:
  • Configuration manual is desrcibed in Bitrix24 official documentation;
  • Go to
    CRM → More → Settings → CRM SettingsCRM → More → Settings → CRM Settings
  • Choose
    Payment option → Payment systemsPayment option → Payment systems
  • Click on Create payment system;
  • In the form of creation of the payment system we fill in the lines:
  • Name - DHFinance;
  • Handler – Choose DHFinance (dhfi);
  • Active – put in checkbox;
  • Client type – creation of 2 payment systems is required, which will be specified by choosing the given feature, for one we choose Contact, for the second Company;
  • API key – fill in the shop API key from DHFI service;
  • DHFI api server – fill in the address of the API interaction service;
  • Is required to create 2 payment systems depending on the type of payers to whom the invoicing is made:
  • Payment system for Contacts;
  • Payment system for Companies;
  • The given configuration is used for the old version of accounts;
  • Example if filling in the form of payment systemExample of filling in the form of the payment system
  • For the new version of accounts: Client creates and configures payment method in the “Sales center” section of the portal:
  • Configuration instruction with detailed description is in Bitrix24 official documentation;
  • Client goes to the section “Sales center” and clicks on “Payment systems”Sales center → Payment systems
  • Chooses in the subsection “Other payment system” system “DHFinance”Select paysystem
  • Fills in the configurations to activate the payment method;
  • Saves changes;
  1. Performs the necessary settings for data exchange via the API: in the payment system settings should be indicated the shop ID and API key from pay.dhfi.online

  2. Payment system DHFI, after activation and correct configuration, is shown depending on the choosen settings in:

  • Public page of the invoice (Illustration 2):
  • Payment methods in the Shop B24 Box on the website page (Illustration 3).

Detailed description of the algorhythm of creation, sending and processing of the payment

  • Video examples of using the invoicing module:
  • Old invoices
  • Sales in sms (Receive payment)
  • After the Client has made an invoice on B24 Box , the public link of an invoice is send to the customer via the choosen communication channel;
  • The customer opens a given invoice link to choose the payment method and proceeding the payment;
  • In a block “Pay Using” we can see an icon and the name of the payment method of Module - “DHFinance”;
  • On the invoice page the customer chooses the payment system “DHFinance” and clicks on “Pay” or the icon of the payment system:
  • Depends on the choosen type of the invoice;
  • Module sends data request with the parameters to the side of the payment system “DHFI”
  • Parameters are filled in from B24 Box:
  • Sum of the payment;
  • Unique account identificator;
  • The portal receives via API the ready-made formed link to the invoice;
  • The customer is addressed to the page of the payment, a link to which the portal has received as the answer to the request of the parameters mentioned and described above;
  • The customer proceeds payment on the side of DHFI;
  • DHFI, after the payment is received, sends to the portal the information on the completed invoice via CSPR on the DHFI;
  • Status of the invoice in the case of received data of the payment from DHFI, is changed to “Close invoice”.

Illustrations

Illustraton 1 – Example of filling in the form of the payment system for the old accounts

Illustration 1 – Example of filling in the form for the old accounts

Illustration 2 – Public page of the invoice (Old account version)

Illustration 2 – Public page of the invoice (Old account version)

Illustration 3 – Public payment page (New accounts version – sales in chats)

Illustration 3 – Public payment page (New accounts version – sales in chats)

End-to-end testing

NodeJS LTS with npm 8.12. Is required for work

Installation:

In tests folder

  1. Copy .env.example to .env,
  2. Mark in .env URL of the test Bitrix24, admin’s login and password,
  3. Proceed npm install

Required settings of Bitrix24 for running tests

  • Create «CRM + Internet-shop» in the «Shop» section
  • Configure the SMS provider. Without it, a link to the payment can’t be generated,
  • Set payment methods for the old and new accounts: for contacts and for companies,
  • Payment method should be called «DHFinance», on the payment pages tests are oriented to that name.

Running

In the tests folder

  • npm run codeceptjs or npm run codeceptjs:ui
  • npm run codeceptjs:headless if there is no need to show the browser window

About

Bitrix 24 Plugin, will get your store set up with DHFinance in minutes

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 72.8%
  • JavaScript 26.8%
  • Other 0.4%