Go to file
ahmadbilalkhalid 7b09f0a373 abk-hacks added 2020-02-23 19:18:51 +05:00
nicohack202002/uncloud Move vm/{detail,list} under opennebula/vm/{detail,list} and make it admin accessible only + Created vm/list that list currently authenticated user's VMs 2020-02-22 15:49:00 +05:00
products Many more changes 2020-01-27 13:40:57 +05:00
.gitignore +gitignore 2020-02-15 11:15:26 +01:00
README-penguinpay.md ++ hack 2020-02-20 09:44:30 +01:00
README.md Focus on creating a VPN as a first test case 2020-02-20 16:05:58 +01:00
abk-hacks.py abk-hacks added 2020-02-23 19:18:51 +05:00
config.py cleaned requirements.txt 2020-02-20 14:04:53 +05:00
hack-a-vpn.py .gitignore & more 2020-02-20 16:55:01 +01:00
helper.py is_order_valid added in helper.py 2020-02-20 15:23:15 +05:00
ldaptest.py Focus on creating a VPN as a first test case 2020-02-20 16:05:58 +01:00
notes-abk.md Move vm/{detail,list} under opennebula/vm/{detail,list} and make it admin accessible only + Created vm/list that list currently authenticated user's VMs 2020-02-22 15:49:00 +05:00
notes-nico.org Merge nico/meow-pay into ahmedbilal/meow-pay 2020-02-22 07:32:52 +01:00
plan.org Merge nico/meow-pay into ahmedbilal/meow-pay 2020-02-22 07:32:52 +01:00
requirements.txt Remove unneccessary requirements from {repo_root}/requirements.txt + uncloud/secret_sample.py minor changes 2020-02-22 11:36:18 +05:00
sample-pay.conf Add certificates option for etcd 2020-02-19 14:44:19 +05:00
schemas.py use code from ungleich-common 2020-02-20 13:57:32 +05:00
stripe_hack.py ++ hack 2020-02-20 09:44:30 +01:00
stripe_utils.py Merge branch 'nico/meow-pay-master' into HEAD 2020-02-21 20:06:21 +05:00
ucloud_pay.py Merge branch 'nico/meow-pay-master' into HEAD 2020-02-21 20:06:21 +05:00
vat_rates.csv abk-hacks added 2020-02-23 19:18:51 +05:00

README.md

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