Skip to content

Commit d0fe47e

Browse files
committed
updated version
1 parent fe743e9 commit d0fe47e

5 files changed

Lines changed: 44 additions & 7 deletions

File tree

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ If applicable, add screenshots to help explain your problem.
2626
**Environment (please complete the following information):**
2727
- OS: [e.g. iOS]
2828
- Python version: [e.g. 3.8]
29-
- pay_ccavenue version: [e.g. 1.0.0]
29+
- pay_ccavenue version: [e.g. 1.1.0]
3030

3131
**Additional context**
3232
Add any other context about the problem here.

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,22 @@ response_data = {
6868
decrypted_data = ccavenue.decrypt(response_data)
6969
```
7070

71+
5. Handle Webhook/Notification:
72+
73+
```python
74+
# In your webhook endpoint
75+
webhook_payload = request.form # Get the POST data
76+
webhook_data = ccavenue.process_webhook(webhook_payload)
77+
78+
if webhook_data.order_status == "Success":
79+
print(f"Order {webhook_data.order_id} was successful")
80+
print(f"Tracking ID: {webhook_data.tracking_id}")
81+
print(f"Bank Ref: {webhook_data.bank_ref_no}")
82+
elif webhook_data.risk_status == "High":
83+
print(f"Warning: High risk transaction {webhook_data.tracking_id}")
84+
print(f"Reason: {webhook_data.risk_reason}")
85+
```
86+
7187
## Configuration
7288

7389
### Environment Variables
@@ -102,6 +118,7 @@ ccavenue = CCAvenue(
102118

103119
- `encrypt(data: Dict[str, Any]) -> str`: Encrypts the payment data
104120
- `decrypt(data: Dict[str, str]) -> Dict[str, str]`: Decrypts the response data
121+
- `process_webhook(response_body: Dict[str, str]) -> CCavenueWebhookData`: Decrypts and processes webhook data
105122

106123
### `CCavenueFormData` Class
107124

poetry.lock

Lines changed: 24 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "pay_ccavenue"
3-
version = "1.0.0"
3+
version = "1.1.0"
44
description = "A simple library to setup payment integration with CCAvenue"
55
authors = ["Kuldeep Pisda <pisdak79@gmail.com>"]
66
license = "MIT"

src/pay_ccavenue/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
from .ccavenue import CCAvenue # noqa
22

3-
__version__ = "1.0.0"
3+
__version__ = "1.1.0"

0 commit comments

Comments
 (0)