Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Add a python code example #27

Merged
merged 2 commits into from
Mar 15, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 26 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,35 @@ Below you can find some ready-to-use code examples for your website.
The administration panel (for now) is only available for board members.
They can create products to generate the keys required.

#Code examples
# Code examples
No idea how to code, but still want to sell tickets on your CH site?
Use one of these code examples to get going.

//Insert code templates here #6
#### Python 3.5
```python
import requests

#HootHub
url = "http://localhost:9000/api/orders"

payload = {
'name': 'Thomas Ticket',
'email': '[email protected]',
'returnUrl': 'https://www.ch.tudelft.nl/payments/ordercompleted',
'productKeys': ['e44685c5-a360-467c-960d-29843a101bb1', '879941f4-43d1-4ff2-ad66-cbdf3b141cab']
}

response = requests.post(url, json=payload)

print(response.json())
```

#### JavaScript
[Code example required](https://github.com/WISVCH/payments/issues/6)

#### PHP
[Code example required](https://github.com/WISVCH/payments/issues/6)

# HootHub
This project currently is quite minimal, and offers lots of opportunities for great features built by you!
Check out the issue page for HootHub issues, and start earning Uilenballen.

Expand All @@ -28,7 +50,7 @@ You can assign someone in specific or wait for someone to pick it up.
Make sure to include tests and documentation.
If Travis isn't happy, we're not happy.

#Running
# Running
## From IntelliJ
1. Import the project into IntelliJ IDEA, we really recommend using [IntelliJ IDEA Ultimate Edition](https://www.jetbrains.com/idea/), since it includes all the support for Spring. You could use another IDE, but we do not recommend this
2. Make sure you have installed the `Lombok Plugin`
Expand Down