Install `alipay library<https://github.com/fzlee/alipay>`__:
pip install python-alipay-sdk # to update existing installation use pip install -U python-alipay-sdk
Be sure that your server available for requests from outside world (i.e. it shall not be avaialble in local network only)
TODO
- Activate Developer Mode
- Open menu
[[ Settings ]] >> Parameters >> System Parameters - Create following parameters
alipay.app_idalipay.app_auth_code-- optional. Only for ISV (Third-party Service Provider)alipay.app_private_key_file-- path to filealipay.alipay_public_key_string-- content of public key file. Starts with-----BEGIN PUBLIC KEY-----alipay.app_auth_codealipay.app_auth_tokenalipay.notify_url-- optional. Use it if doesn't work automatiically. The url must behttp(s)://YOUR_HOST/alipay/callback.
If you get error invalid out_trade_no, it means that you use the same
credentials in new database and odoo sends Alipay Order IDs that were previously
used in another system. To resolve this do as following:
- Go to
[[ Settings ]] >> Technical >> Sequence & Identifiers >> Sequences - Find record Alipay Order or Alipay Refund*, depending on which request has the problem
- Change either Prefix, Suffix or Next Number
- If you get the error again, try to increase Next Number
Alipay records (Orders, Refunds, etc.) can be found at [[ Invoicing ]] >> Configuration >> Alipay. If you don't have that menu, you need to configure Show Full Accounting Features for your user first:
- Activate Developer Mode
- Open menu
[[ Settings ]] >> Users & Companies >> Users - Open user you need
- Activate
Show Full Accounting Features