Skip to main content

Common API to use all French online payment credit card processing services

Project description

Interface with French's bank online credit card processing services
===================================================================

Services supported are:
- ATOS/SIPS v2 used by:
- BNP under the name Mercanet,
- Banque Populaire (before 2010/2011) under the name Cyberplus,
- CCF under the name Elysnet,
- HSBC under the name Elysnet,
- Crédit Agricole under the name e-Transactions,
- La Banque Postale under the name ScelliusNet,
- LCL under the name Sherlocks,
- Société Générale under the name Sogenactif
- and Crédit du Nord under the name Webaffaires,
- Payzen/SystemPay v2 by Banque Populaire (since 2010/2011) and Caisse d'Épargne (Natixis)
- TIPI/PayFiP Régie
- PayFiP Régie Web-service
- Ogone
- Paybox
- Payzen

You can emit payment request under a simple API which takes as input a
dictionnary as configuration and an amount to pay. You get back a
transaction_id. Another unique API allows to handle the notifications coming
from those services, reporting whether the transaction was successful and which
one it was. The full content (which is specific to the service) is also
reported for logging purpose.

The spplus and paybox module also depend upon the python Crypto library for DES
decoding of the merchant key and RSA signature validation on the responses.

Some backends allow to specify the order and transaction ids in different
fields, in order to allow to match them in payment system backoffice. They are:
- Payzen
- SIPS
- SystemPay
- PayFiP Régie Web-Service

For other backends, the order and transaction ids, separated by '!' are sent in
order id field, so they can be matched in backoffice.

PayFiP Régie Web-Service
========================

You can test your PayFiP regie web-service connection with an integrated CLI utility:

$ python3 -m eopayment.payfip_ws info-client --help
Usage: payfip_ws.py info-client [OPTIONS] NUMCLI

Options:
--help Show this message and exit.

$ python3 -m eopayment.payfip_ws get-idop --help
Usage: payfip_ws.py get-idop [OPTIONS] NUMCLI

Options:
--saisie [T|X|W] [required]
--exer TEXT [required]
--montant INTEGER [required]
--refdet TEXT [required]
--mel TEXT [required]
--url-notification TEXT [required]
--url-redirect TEXT [required]
--objet TEXT
--help Show this message and exit.

$ python3 -m eopayment.payfip_ws info-paiement --help
Usage: payfip_ws.py info-paiement [OPTIONS] IDOP

Options:
--help Show this message and exit.


Generic CLI Tool
================

You can put some configuration in ~/.config/eopayment.init ::

[default]
debug=yes

[systempayv2]
# same name as passed in the options argument to Payment.__init__()
vads_site_id=12345678
secret_test=xyzabcdefgh
vads_ctx_mode=TEST

$ python3 -m eopayment --option vads_site_id=56781234 request 10.0 --param transaction_id=1234 --param email=john.doe@example.com
Transaction ID: 1234
<form method="POST" action="https://paiement.systempay.fr/vads-payment/">
<input type="hidden" name="vads_cust_country" value="FR"/>
<input type="hidden" name="vads_validation_mode" value=""/>
<input type="hidden" name="vads_site_id" value="12345678"/>
<input type="hidden" name="vads_payment_config" value="SINGLE"/>
<input type="hidden" name="vads_trans_id" value="GavPXW"/>
<input type="hidden" name="vads_action_mode" value="INTERACTIVE"/>
<input type="hidden" name="vads_contrib" value="eopayment"/>
<input type="hidden" name="vads_page_action" value="PAYMENT"/>
<input type="hidden" name="vads_amount" value="1010"/>
<input type="hidden" name="signature" value="d5690d02fed621687b19c90053a77b37a1c78370"/>
<input type="hidden" name="vads_ctx_mode" value="TEST"/>
<input type="hidden" name="vads_version" value="V2"/>
<input type="hidden" name="vads_payment_cards" value=""/>
<input type="hidden" name="vads_ext_info_eopayment_trans_id" value="1234"/>
<input type="hidden" name="vads_trans_date" value="20201027211254"/>
<input type="hidden" name="vads_language" value="fr"/>
<input type="hidden" name="vads_capture_delay" value=""/>
<input type="hidden" name="vads_currency" value="978"/>
<input type="hidden" name="vads_cust_email" value="john.doe@example.com"/>
<input type="hidden" name="vads_return_mode" value="GET"/>
<input type="submit" name="Submit" value="Submit" />
</form>
[ Local browser is automatically opened with this form which is auto-submitted ]

$ python3 -m eopayment --debug response 'vads_amount=1010&vads_auth_mode=FULL&vads_auth_number=3fd070&vads_auth_result=00&vads_capture_delay=0&vads_card_brand=CB&vads_card_number=597010XXXXXX0018&vads_payment_certificate=f582e920616a33bdaa0c242ee3fc3d435d367575&vads_ctx_mode=TEST&vads_currency=978&vads_effective_amount=1010&vads_effective_currency=978&vads_site_id=12345678&vads_trans_date=20201029093825&vads_trans_id=Vlco55&vads_trans_uuid=e8defc7bd32c418c93c4b2be676d2796&vads_validation_mode=0&vads_version=V2&vads_warranty_result=&vads_payment_src=EC&vads_cust_country=FR&vads_contrib=eopayment&vads_tid=001&vads_sequence_number=1&vads_contract_used=2334410&vads_trans_status=AUTHORISED&vads_expiry_month=6&vads_expiry_year=2021&vads_bank_label=Banque+de+d%C3%A9mo+et+de+l%27innovation&vads_bank_product=MCW&vads_pays_ip=FR&vads_presentation_date=20201029093826&vads_effective_creation_date=20201029093826&vads_operation_type=DEBIT&vads_result=00&vads_extra_result=&vads_card_country=FR&vads_language=fr&vads_brand_management=%7B%22userChoice%22%3Afalse%2C%22brandList%22%3A%22CB%7CMASTERCARD%22%2C%22brand%22%3A%22CB%22%7D&vads_action_mode=INTERACTIVE&vads_payment_config=SINGLE&vads_page_action=PAYMENT&vads_threeds_enrolled=Y&vads_threeds_auth_type=CHALLENGE&vads_threeds_eci=02&vads_threeds_xid=RFBSMkdWdFE0Wk15VWw0RkJjMzU%3D&vads_threeds_cavvAlgorithm=2&vads_threeds_status=Y&vads_threeds_sign_valid=1&vads_threeds_error_code=&vads_threeds_exit_status=10&vads_threeds_cavv=jG26AYSjvclBARFYSf%2FtXRmjGXM%3D&signature=5594aa2bc35c9e45e759b08df339e5f8ecf2c410'
result : 3
signed : True
bank_data :
{'__bank_id': '3fd070',
'signature': '5594aa2bc35c9e45e759b08df339e5f8ecf2c410',
'vads_action_mode': 'INTERACTIVE',
'vads_amount': '1010',
'vads_auth_mode': 'FULL',
'vads_auth_number': '3fd070',
'vads_auth_result': '00',
'vads_auth_result_message': 'Transaction approuvée ou traitée avec succès',
'vads_bank_label': "Banque de démo et de l'innovation",
'vads_bank_product': 'MCW',
'vads_brand_management': '{"userChoice":false,"brandList":"CB|MASTERCARD","brand":"CB"}',
'vads_capture_delay': '0',
'vads_card_brand': 'CB',
'vads_card_country': 'FR',
'vads_card_number': '597010XXXXXX0018',
'vads_contract_used': '2334410',
'vads_contrib': 'eopayment',
'vads_ctx_mode': 'TEST',
'vads_currency': '978',
'vads_cust_country': 'FR',
'vads_effective_amount': '1010',
'vads_effective_creation_date': '20201029093826',
'vads_effective_currency': '978',
'vads_expiry_month': '6',
'vads_expiry_year': '2021',
'vads_extra_result': '',
'vads_extra_result_message': 'Pas de contrôle effectué.',
'vads_language': 'fr',
'vads_operation_type': 'DEBIT',
'vads_page_action': 'PAYMENT',
'vads_payment_certificate': 'f582e920616a33bdaa0c242ee3fc3d435d367575',
'vads_payment_config': 'SINGLE',
'vads_payment_src': 'EC',
'vads_pays_ip': 'FR',
'vads_presentation_date': '20201029093826',
'vads_result': '00',
'vads_result_message': 'Paiement réalisé avec succés.',
'vads_sequence_number': '1',
'vads_site_id': '12345678',
'vads_threeds_auth_type': 'CHALLENGE',
'vads_threeds_cavv': 'jG26AYSjvclBARFYSf/tXRmjGXM=',
'vads_threeds_cavvAlgorithm': '2',
'vads_threeds_eci': '02',
'vads_threeds_enrolled': 'Y',
'vads_threeds_error_code': '',
'vads_threeds_exit_status': '10',
'vads_threeds_sign_valid': '1',
'vads_threeds_status': 'Y',
'vads_threeds_xid': 'RFBSMkdWdFE0Wk15VWw0RkJjMzU=',
'vads_tid': '001',
'vads_trans_date': '20201029093825',
'vads_trans_id': 'Vlco55',
'vads_trans_status': 'AUTHORISED',
'vads_trans_uuid': 'e8defc7bd32c418c93c4b2be676d2796',
'vads_validation_mode': '0',
'vads_version': 'V2',
'vads_warranty_result': ''}
return_content : None
bank_status : Paiement réalisé avec succés.
transaction_id : 3fd070
order_id : 20201029093825_Vlco55
test : True
transaction_date : 2020-10-29 09:38:26+00:00

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eopayment-1.65.tar.gz (81.1 kB view details)

Uploaded Source

File details

Details for the file eopayment-1.65.tar.gz.

File metadata

  • Download URL: eopayment-1.65.tar.gz
  • Upload date:
  • Size: 81.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.4.2 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.1+

File hashes

Hashes for eopayment-1.65.tar.gz
Algorithm Hash digest
SHA256 aabc5a7c73347eed79920fc891ef75416e14c20d681f2c1317c34613d875dad0
MD5 e1dc9bf1cb3557d75cb92f59c9cac7af
BLAKE2b-256 8fb1b669d5589a5e0743fdc275917611e7d015f1c4efd3c46f726de2b52c5bc9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page