Download the PHP package smiftakhairul/sslcommerz without Composer

On this page you can find all versions of the php package smiftakhairul/sslcommerz. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sslcommerz

SSLCommerz

SSLCommerz is the first payment gateway in Bangladesh opening doors for merchants to receive payments on the internet via their online stores.

Official documentation here.

Installation

Vendor

A file sslcommerz.php will be added to config directory after running above command. We need to setup our configuration to .env file as follows:

For deveopment mode we need to set IS_PRODUCTION=false, and for production mode IS_PRODUCTION=true. Please go through the official docs of SSLCommerz for further information.

Usage

Initiate a payment

Set store information dynamically

Response

You will get a response after initiating a payment by which you can deal with. You can see a sample response format in the official documentation.

Hosted Payment Integration

Easy Checkout Integration

Disable CSRF Protection

Disable CSRF protection for the following URL's.

Disable them from VerifyCsrfToken middleware.

Order Validation

Transaction Query

Refund

Available Env's & API's

Environments: getApiEnvironment()

Domains: getApiDomain()

APIs:

Available Methods

Environment & domain related configuration:
Method Name Param Info Description
getApiEnvironment() API environment: sandbox or production.
setApiEnvironment() string Set API environment: sandbox or production only.
getApiDomain() API domain: for example
https://sandbox.sslcommerz.com
or
https://securepay.sslcommerz.com
isProductionMode() Get production_mode.
setProductionMode() boolean Set production_mode. By default, production_mode sets by IS_PRODUCTION value.
API url configuration:
Method Name Param Info Description
getApiUrl() Get payment initiate api url.
setApiUrl() string Set payment initiate api url. By default, api url sets based on IS_PRODUCTION value. If IS_PRODUCTION = true, live api url will be set and for IS_PRODUCTION = false sandbox api url will be set.
getTransactionStatusApiUrl() Get transaction status api url.
setTransactionStatusApiUrl() string Set transaction status api url.
getOrderValidateApiUrl() Get order validation api url.
setOrderValidateApiUrl() string Set order validation api url.
getRefundPaymentApiUrl() Get refund payment api url.
setRefundPaymentApiUrl() string Set refund payment api url.
getRefundStatusApiUrl() Get refund status api url.
setRefundStatusApiUrl() string Set refund status api url.

Set information as a compact:

Method Name Param Info Description
getPrimaryInformation() Get primary information such as:
store_id, store_passwd, total_amount, currency, tran_id, success_url, fail_url, cancel_url and other optional information.
setPrimaryInformation() array() Set primary information.

Required parameter key elements:
  • store_id
  • store_passwd
  • total_amount
  • currency
  • tran_id
  • success_url
  • fail_url
  • cancel_url
Optional parameter key elements:
  • ipn_url
  • multi_card_name
  • allowed_bin
getCustomerInformation() Get customer information such as:
cus_name, cus_email, cus_add1, cus_add2, cus_city, cus_postcode, cus_country, cus_phone and other optional information.
setCustomerInformation() array() Set customer information.

Required parameter key elements:
  • cus_name
  • cus_email
  • cus_add1
  • cus_add2
  • cus_city
  • cus_postcode
  • cus_country
  • cus_phone
Optional parameter key elements:
  • cus_state
  • cus_fax
getProductInformation() Get product information such as:
product_name, product_category, product_profile and other optional information.
setProductInformation() array() Set product information.

Required parameter key elements:
  • product_name
  • product_category
  • product_profile
Optional parameter key elements:
  • cart
  • product_amount
  • vat
  • discount_amount
  • convenience_fee
  • hours_till_departure
  • flight_type
  • pnr
  • journey_from_to
  • third_party_booking
  • hotel_name
  • length_of_stay
  • check_in_time
  • hotel_city
  • product_type
  • topup_number
  • country_topup
getShipmentInformation() Get shipment information such as:
shipping_method, num_of_item and other optional information.
setShipmentInformation() array() Set shipment information.

Required parameter key elements:
  • shipping_method
  • num_of_item
Optional parameter key elements:
  • ship_name
  • ship_add1
  • ship_add2
  • ship_state
  • ship_city
  • ship_postcode
  • ship_country
getEmiInformation() Get EMI information such as:
emi_option and other optional information.
setEmiInformation() array() Set EMI information.

Required parameter key elements:
  • emi_option
Optional parameter key elements:
  • emi_max_inst_option
  • emi_selected_inst
  • emi_allow_only
getAdditionalInformation() Get additional information such as:
value_a, value_b, value_c, value_d.
setAdditionalInformation() array() Set additional information.

Optional parameter key elements:
  • value_a
  • value_b
  • value_c
  • value_d
Other getters and setters:
Method Name Param Info Description
getPaymentDisplayType() Get payment display type.
setPaymentDisplayType()* enum('hosted', 'checkout') Set payment display type. Default value is checkout.
getStoreId() Get SSLCommerz store_id.
setStoreId()* string Set SSLCommerz store_id. Default value sets by STORE_ID value.
getStorePassword() Get SSLCommerz store_passwd.
setStorePassword()* string Set SSLCommerz store_passwd. Default value sets by STORE_PASSWORD value.
getTotalAmount() Get total_amount of transaction.
setTotalAmount()* decimal Set total_amount of transaction. The transaction amount must be from 10.00 BDT to 500000.00 BDT
getCurrency() Get currency type. Example: BDT, USD, EUR, SGD, INR, MYR, etc
setCurrency()* string Set currency type.
getTranId() Get unique tran_id to identify order.
setTranId()* string Set tran_id to unify your order.
getSuccessUrl() Get callback success_url.
setSuccessUrl()* string Set callback success_url where user will redirect after successful payment.
getFailUrl() Get callback fail_url.
setFailUrl()* string Set callback fail_url where user will redirect after any failure occurs during payment.
getCancelUrl() Get callback cancel_url.
setCancelUrl()* string Set callback cancel_url where user will redirect if user cancels the transaction.
getIpnUrl() Get Instant Payment Notification ipn_url.
setIpnUrl() string Set ipn_url. Enable instant payment notification option so that SSLCommerz can send the transaction's status to ipn_url.
getMultiCardName() Get multi_card_name.
setMultiCardName() string Set multi_card_name. Use it only if gateway list needs to be customized.
getAllowedBin() Get allowed_bin.
setAllowedBin() string Set allowed_bin. Use it only if transaction needs to be controlled.
getCustomerName() Get cus_name.
setCustomerName()* string Set cus_name.
getCustomerEmail() Get cus_email.
setCustomerEmail()* string Set cus_email.
getCustomerAddress1() Get cus_add1.
setCustomerAddress1()* string Set cus_add1.
getCustomerAddress2() Get cus_add2.
setCustomerAddress2() string Set cus_add2.
getCustomerCity() Get cus_city.
setCustomerCity()* string Set cus_city.
getCustomerState() Get cus_state.
setCustomerState() string Set cus_state.
getCustomerPostCode() Get cus_postcode.
setCustomerPostCode()* string Set cus_postcode.
getCustomerCountry() Get cus_country.
setCustomerCountry()* string Set cus_country.
getCustomerPhone() Get cus_phone.
setCustomerPhone()* string Set cus_phone.
getCustomerFax() Get cus_fax.
setCustomerFax() string Set cus_fax.
getProductName() Get product_name.
setProductName()* string Set product_name.
getProductCategory() Get product_category.
setProductCategory()* string Set product_category.
getProductProfile() Get product_profile.
setProductProfile()* string Set product_profile.

Available keys:
  1. general
  2. physical-goods
  3. non-physical-goods
  4. airline-tickets
  5. travel-vertical
  6. telecom-vertical
getProductHoursTillDeparture() Get hours_till_departure.
setProductHoursTillDeparture()** string Set hours_till_departure. Required if product_profile is airline-tickets.
getProductFlightType() Get flight_type.
setProductFlightType()** string Set flight_type. Required if product_profile is airline-tickets.
getProductPnr() Get pnr.
setProductPnr()** string Set pnr. Required if product_profile is airline-tickets.
getProductJourneyFromTo() Get journey_from_to.
setProductJourneyFromTo()** string Set journey_from_to. Required if product_profile is airline-tickets.
getProductThirdPartyBooking() Get third_party_booking.
setProductThirdPartyBooking()** string Set third_party_booking. Required if product_profile is airline-tickets.
getProductHotelName() Get hotel_name.
setProductHotelName()** string Set hotel_name. Required if product_profile is travel-vertical.
getProductLengthOfStay() Get length_of_stay.
setProductLengthOfStay()** string Set length_of_stay. Required if product_profile is travel-vertical.
getProductCheckInTime() Get check_in_time.
setProductCheckInTime()** string Set check_in_time. Required if product_profile is travel-vertical.
getProductHotelCity() Get hotel_city.
setProductHotelCity()** string Set hotel_city. Required if product_profile is travel-vertical.
getProductType() Get product_type.
setProductType()** string Set product_type. Required if product_profile is telecom-vertical.
getProductTopUpNumber() Get topup_number.
setProductTopUpNumber()** string Set topup_number. Required if product_profile is telecom-vertical.
getProductCountryTopUp() Get country_topup.
setProductCountryTopUp()** string Set country_topup. Required if product_profile is telecom-vertical.
getCart() Get cart.
setCart() json Set cart. JSON data with two elements. product: Max 255 characters, quantity: Quantity in numeric value and amount: Decimal (12,2).

Example:
[{"product":"DHK TO BRS AC A1","quantity":"1","amount":"200.00"},{"product":"DHK TO BRS AC A2","quantity":"1","amount":"200.00"},{"product":"DHK TO BRS AC A3","quantity":"1","amount":"200.00"},{"product":"DHK TO BRS AC A4","quantity":"2","amount":"200.00"}]
getProductAmount() Get product_amount.
setProductAmount() decimal Set product_amount.
getVat() Get vat.
setVat() decimal Set vat.
getDiscountAmount() Get discount_amount.
setDiscountAmount() decimal Set discount_amount.
getConvenienceFee() Get convenience_fee.
setConvenienceFee() decimal Set convenience_fee.
getShippingMethod() Get shipping_method of the order.
setShippingMethod()* string Set shipping_method of the order. Example: YES or NO or Courier.
getShippingItemNumber() Get num_of_item of product.
setShippingItemNumber()* integer Set num_of_item of product will be shipped.
getShippingName() Get ship_name of address.
setShippingName()** string Set ship_name of address. Required if shipping_method is YES.
getShippingAddress1() Get ship_add1.
setShippingAddress1()** string Set ship_add1. Required if shipping_method is YES.
getShippingAddress2() Get ship_add2.
setShippingAddress2() string Set ship_add2.
getShippingCity() Get ship_city.
setShippingCity()** string Set ship_city. Required if shipping_method is YES.
getShippingState() Get ship_state.
setShippingState() string Set ship_state.
getShippingPostCode() Get ship_postcode.
setShippingPostCode()** string Set ship_postcode. Required if shipping_method is YES.
getShippingCountry() Get ship_country.
setShippingCountry()** string Set ship_country. Required if shipping_method is YES.
getEmiOption() Get emi_option.
setEmiOption()* integer Set emi_option. Value must be 1 or 0.
getEmiMaxInstOption() Get emi_max_inst_option.
setEmiMaxInstOption() integer Set emi_max_inst_option.
getEmiSelectedInst() Get emi_selected_inst.
setEmiSelectedInst() integer Set emi_selected_inst.
getEmiAllowOnly() Get emi_allow_only.
setEmiAllowOnly() integer Set emi_allow_only. Value must be 1 or 0. This parameter depends on emi_option and emi_selected_inst
getAdditionalValueA() Get value_a.
setAdditionalValueA() string Set value_a.
getAdditionalValueB() Get value_b.
setAdditionalValueB() string Set value_b.
getAdditionalValueC() Get value_c.
setAdditionalValueC() string Set value_c.
getAdditionalValueD() Get value_d.
setAdditionalValueD() string Set value_d.

* = Required and ** = Dependently Required.

License

MIT


All versions of sslcommerz with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3|^8.0
laravel/framework Version ^8.12
guzzlehttp/guzzle Version ^7.0.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package smiftakhairul/sslcommerz contains the following files

Loading the files please wait ....