pour gerer les abonnements récurrents Stripe dans dolibarr

Sylhaf 5567a7b1c9 linux script před 6 měsíci
.gitignore eb18bcc72b first commit after cleaning, working version před 2 roky
CHOOSE LANGUAGE IN PARAMETERS.png e54356091c Working Version of DoliStripe - Headless Server Version před 8 měsíci
app_logging.py eb18bcc72b first commit after cleaning, working version před 2 roky
docker-compose.yml d88e9df3c8 windows luanch script před 6 měsíci
get-pip.py e54356091c Working Version of DoliStripe - Headless Server Version před 8 měsíci
launch.sh ab8bc46232 launch script před 8 měsíci
linux_launch.sh 5567a7b1c9 linux script před 6 měsíci
main.py d88e9df3c8 windows luanch script před 6 měsíci
msedgedriver.exe 373eb3e618 little fix před 8 měsíci
process.txt eb18bcc72b first commit after cleaning, working version před 2 roky
readme.md 284e9804cf update readme před 2 roky
references_example.conf aa567f0b2e fixed quotes mistake před 2 roky
requirements.txt 2308d5436f update requirements před 2 roky
windows_launch.bat d88e9df3c8 windows luanch script před 6 měsíci
zero_invoice.py 8136d7a180 support Free contract + pay all 0 invoices před 1 rokem

readme.md

This project is meant to have a link between Stripe Subscriptions and Dolibar contract with reccuring invoice.

I use it for my association who is an internet provider : Slash - https://slashthd.fr

The main goal of this script is to mark the dolibarr invoice as "paid" when the Stripe automatic payment occurs.

thanks https://www.mistergeek.net for the visibility.

Manual :

  1. get a dolibarr account that can read/write invoices/contracts/clients and get an read Stripe API KEY, put both in a reference.conf file. an exemple of conf is in the file references_example.conf.
  2. Create your contract associated to your client in dolibarr and get his ID in its URL : https://dolibarr_instance.com/contrat/card.php?id=13 -> here the ID is 13, with the contract you can create an invoice manually or use recuuring invoice. For now it's working only for monthly subscriptions. i can add the feature if requested.
  3. you have to wait the first payment of your client in Stripe, when it's done get the subscription ID, it looks like something like that : sub_1Lsdhjqsdlkqh2367sdhqjTx

put the two reference in the reference.conf

the script is using selenium and request.

Console Option of the Script :

usage: main.py [-h] [-v] [-d] [-m] [-p]

options: -h, --help show this help message and exit -v, --verbosity increase output verbosity -d, --dry perform a dry run -m, --mail send invoice per mail to client (to add copy mail to a mail check contact mail in refenrence example file) -p, --planned trigger planned work to

In order of execution the script will :

  1. verify connection to Stripe
  2. Test All Stripe Subscription référence and gather Data about it (last payment)
  3. Connect to dolibarr via Selenium to Gather contracts data, specifically all invoice associated. if an invoice is "unpaid" and have the same month of the stripe payment it will be registered for processing later.
  4. make a summary in console of what action will be perfomed
  5. perform actions : mark corresponding invoices as "paid" with stripe details and if option is activated send a mail to the client registered in dolibarr. (it uses the Stripe Mail)