No description
Find a file
2020-02-19 14:44:19 +05:00
products Many more changes 2020-01-27 13:40:57 +05:00
.gitignore README.md updated and reorganized, Improved error handling for configparser and ldap manager, requirements.txt added 2020-02-19 11:59:54 +05:00
config.py Add certificates option for etcd 2020-02-19 14:44:19 +05:00
etcd_wrapper.py Sample config file added + uncloud dependency removed 2020-02-19 10:22:15 +05:00
helper.py Many more changes 2020-01-27 13:40:57 +05:00
ldap_manager.py README.md updated and reorganized, Improved error handling for configparser and ldap manager, requirements.txt added 2020-02-19 11:59:54 +05:00
README.md Update README.md 2020-02-19 13:13:39 +05:00
requirements.txt README.md updated and reorganized, Improved error handling for configparser and ldap manager, requirements.txt added 2020-02-19 11:59:54 +05:00
sample-pay.conf Add certificates option for etcd 2020-02-19 14:44:19 +05:00
schemas.py README.md updated and reorganized, Improved error handling for configparser and ldap manager, requirements.txt added 2020-02-19 11:59:54 +05:00
stripe_utils.py README.md updated and reorganized, Improved error handling for configparser and ldap manager, requirements.txt added 2020-02-19 11:59:54 +05:00
ucloud_pay.py README.md updated and reorganized, Improved error handling for configparser and ldap manager, requirements.txt added 2020-02-19 11:59:54 +05:00

uncloud-pay

The generic product/payment system.

Installation

pip3 install -r requirements.txt

Getting Started

python ucloud_pay.py

Usage

1. Adding of products

http --json http://[::]:5000/product/add username=your_username_here password=your_password_here specs:=@ipv6-only-vm.json

2. Listing of products

http --json http://[::]:5000/product/list

3. Registering user's payment method (credit card for now using Stripe)

http --json http://[::]:5000/user/register_payment card_number=4111111111111111 cvc=123 expiry_year=2020 expiry_month=8 card_holder_name="The test user" username=your_username_here password=your_password_here line1="your_billing_address" city="your_city" country="your_country"

4. Ordering products

First of all, user have to buy the membership first.

http --json http://[::]:5000/product/order username=your_username_here password=your_password_here product_id=membership pay=True
http --json http://[::]:5000/product/order username=your_username_here password=your_password_here product_id=ipv6-only-vm cpu=1 ram=1 os-disk-space=10 os=alpine pay=True

5. Listing users orders

http --json POST http://[::]:5000/order/list username=your_username_here password=your_password_here