Skip to content

Instantly share code, notes, and snippets.

@rkbi
Created October 27, 2022 11:36
Show Gist options
  • Save rkbi/c56db9b6a3d2cf7cd6eabe3122d9cbcd to your computer and use it in GitHub Desktop.
Save rkbi/c56db9b6a3d2cf7cd6eabe3122d9cbcd to your computer and use it in GitHub Desktop.

Revisions

  1. rkbi created this gist Oct 27, 2022.
    33 changes: 33 additions & 0 deletions cmd.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,33 @@
    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 '[email protected]' \
    -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'])"