Skip to content

Commit

Permalink
Generating Python SDK.
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbucket-pipelines committed Nov 15, 2024
1 parent 74d4c75 commit 355a4a8
Show file tree
Hide file tree
Showing 12 changed files with 95 additions and 89 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@ pip install cashfree_pg
from cashfree_pg.models.create_order_request import CreateOrderRequest
from cashfree_pg.api_client import Cashfree
from cashfree_pg.models.customer_details import CustomerDetails
from cashfree_pg.models.order_meta import OrderMeta

Cashfree.XClientId = "<x-client-id>"
Cashfree.XClientSecret = "<x-client-secret>"
Cashfree.XEnvironment = Cashfree.SANDBOX
x_api_version = "2023-08-01"
x_api_version = "2022-09-01"
```

Generate your API keys (x-client-id , x-client-secret) from [Cashfree Merchant Dashboard](https://merchant.cashfree.com/merchants/login)
Expand All @@ -39,7 +38,7 @@ Generate your API keys (x-client-id , x-client-secret) from [Cashfree Merchant D
Create Order
```python
customerDetails = CustomerDetails(customer_id="walterwNrcMi", customer_phone="9999999999")
orderMeta = OrderMeta(return_url="https://www.cashfree.com/devstudio/preview/pg/web/checkout?order_id={order_id}")
orderMeta = CreateOrderRequestOrderMeta(return_url="https://www.cashfree.com/devstudio/preview/pg/web/checkout?order_id={order_id}")
createOrderRequest = CreateOrderRequest(order_amount=1, order_currency="INR", customer_details=customerDetails, order_meta=orderMeta)
try:
api_response = Cashfree().PGCreateOrder(x_api_version, createOrderRequest, None, None)
Expand Down
2 changes: 1 addition & 1 deletion cashfree_pg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
""" # noqa: E501


__version__ = "4.2.3"
__version__ = "4.3.0"

# import apis into sdk package
# import ApiClient
Expand Down
Loading

0 comments on commit 355a4a8

Please sign in to comment.