Created
October 27, 2022 11:36
-
-
Save rkbi/c56db9b6a3d2cf7cd6eabe3122d9cbcd to your computer and use it in GitHub Desktop.
Simple cURL command to test SSLCommerz Sandbox API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -X POST https://sandbox.sslcommerz.com/gwprocess/v4/api.php -d 'store_id=tripo5d8359d4ec088' \ | |
-d 'store_passwd=tripo5d8359d4ec088@ssl' \ | |
-d 'total_amount=100' \ | |
-d 'currency=EUR' \ | |
-d 'tran_id=REF123' \ | |
-d 'success_url=http://yoursite.com/success.php' \ | |
-d 'fail_url=http://yoursite.com/fail.php' \ | |
-d 'cancel_url=http://yoursite.com/cancel.php' \ | |
-d 'cus_name=Customer Name' \ | |
-d 'cus_email=cust@yahoo.com' \ | |
-d 'cus_add1=Dhaka' \ | |
-d 'cus_add2=Dhaka' \ | |
-d 'cus_city=Dhaka' \ | |
-d 'cus_state=Dhaka' \ | |
-d 'cus_postcode=1000' \ | |
-d 'cus_country=Bangladesh' \ | |
-d 'cus_phone=01711111111' \ | |
-d 'cus_fax=01711111111' \ | |
-d 'shipping_method=NO' \ | |
-d 'product_name=One Man Show' \ | |
-d 'product_category=Cosmetics' \ | |
-d 'product_profile=physical' \ | |
-d 'ship_name=Customer Name' \ | |
-d 'ship_add1 =Dhaka' \ | |
-d 'ship_add2=Dhaka' \ | |
-d 'ship_city=Dhaka' \ | |
-d 'ship_state=Dhaka' \ | |
-d 'ship_postcode=1000' \ | |
-d 'ship_country=Bangladesh' \ | |
-d 'multi_card_name=mastercard,visacard,amexcard' \ | |
-d 'value_c=ref003_C' \ | |
-d 'value_d=ref004_D' | \ | |
python3 -c "import sys, json; data=json.load(sys.stdin); print('\n','Redirect user to: ', data['GatewayPageURL'])" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment