Skip to content

Commit ce2df53

Browse files
committed
Updated version to 1.0.1 and fixed issue #3
1 parent e867cfe commit ce2df53

File tree

4 files changed

+19
-35
lines changed

4 files changed

+19
-35
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ venv
44
build
55
dist
66
*.egg*
7-
.pytest*
7+
.pytest*
8+
test_module

Tests/test_general.py

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
from sslcommerz_python_api import SSLCSession
22
from decimal import Decimal
33

4+
45
def response():
5-
mypayment = SSLCSession(sslc_is_sandbox=True, sslc_store_id='your_sslc_store_id', sslc_store_pass='your_sslc_store_passcode')
6-
mypayment.set_urls(success_url='example.com/success', fail_url='example.com/failed', cancel_url='example.com/cancel', ipn_url='example.com/payment_notification')
7-
mypayment.set_product_integration(total_amount=Decimal('20.20'), currency='BDT', product_category='clothing', product_name='demo-product', num_of_item=2, shipping_method='YES', product_profile='None')
8-
mypayment.set_customer_info(name='John Doe', email='[email protected]', address1='demo address', address2='demo address 2', city='Dhaka', postcode='1207', country='Bangladesh', phone='01711111111')
9-
mypayment.set_shipping_info(shipping_to='demo customer', address='demo address', city='Dhaka', postcode='1209', country='Bangladesh')
10-
# If you want to post some additional values
11-
mypayment.set_additional_values(value_a='[email protected]', value_b='portalcustomerid', value_c='1234', value_d='uuid')
12-
return mypayment.init_payment()
6+
mypayment = SSLCSession(sslc_is_sandbox=True, sslc_store_id='your_sslc_store_id',
7+
sslc_store_pass='your_sslc_store_passcode')
8+
mypayment.set_urls(success_url='example.com/success', fail_url='example.com/failed',
9+
cancel_url='example.com/cancel', ipn_url='example.com/payment_notification')
10+
mypayment.set_product_integration(total_amount=Decimal('20.20'), currency='BDT', product_category='clothing',
11+
product_name='demo-product', num_of_item=2, shipping_method='YES', product_profile='None')
12+
mypayment.set_customer_info(name='John Doe', email='[email protected]', address1='demo address',
13+
address2='demo address 2', city='Dhaka', postcode='1207', country='Bangladesh', phone='01711111111')
14+
mypayment.set_shipping_info(shipping_to='demo customer', address='demo address',
15+
city='Dhaka', postcode='1209', country='Bangladesh')
16+
# If you want to post some additional values
17+
mypayment.set_additional_values(
18+
value_a='[email protected]', value_b='portalcustomerid', value_c='1234', value_d='uuid')
19+
return mypayment.init_payment()
20+
1321

1422
def test_response():
15-
assert test_response is not None
23+
assert test_response is not None

requirements.txt

226 Bytes
Binary file not shown.

setup.py

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)