Skip to content

Instantly share code, notes, and snippets.

View rkbi's full-sized avatar
🎯
Learning everyday

Rakibul Islam rkbi

🎯
Learning everyday
View GitHub Profile
@rkbi
rkbi / cmd.sh
Created October 27, 2022 11:36
Simple cURL command to test SSLCommerz Sandbox API
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' \
@rkbi
rkbi / MainActivity.java
Last active February 15, 2022 03:56
SSLCommerz Android SDK Implementation Example Code (Newer Version)
package com.sslwireless.sslsdkintegration;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.CompoundButton;
import android.widget.EditText;
<?php
$f = file_get_contents('response-example.json');
function getBkashURL($json_str)
// Return Bkash redirect URL from api response json string.
{
$data_array = json_decode($json_str);
$desc = $data_array->desc;
@rkbi
rkbi / web.php
Created July 24, 2021 18:45
Laravel routes for artisan commands
<?php
use Illuminate\Support\Facades\Artisan;
Route::get('/clearing-cache', function() {
$exitCode = Artisan::call('cache:clear');
return '<h1>Cache facade value cleared</h1>';
});
Route::get('/optimize', function() {
@rkbi
rkbi / sslcz-sandbox.json
Created December 7, 2020 18:10
Postman Collection for SSLCommerz Sandbox
{
"info": {
"_postman_id": "fa263d8e-2a23-49a3-aae4-e138ac1c5f9c",
"name": "SSLCommerz Sandbox",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "https://sandbox.sslcommerz.com/gwprocess/v4/api.php",
"request": {
<select name="country_code">
<option value="880">Bangladesh(+880)</option>
<option value="91">India(+91)</option>
<option value="86">China(+86)</option>
<option value="66">Thailand(+66)</option>
<option value="44">United Kingdom of Great Britain and Northern Ireland(+44)</option>
<option value="1">United States of America(+1)</option>
<option value="855">Cambodia(+855)</option>
<option value="964">Iraq(+964)</option>
<option value="20">Egypt(+20)</option>
@rkbi
rkbi / MainActivity.java
Last active December 2, 2020 19:44
SSLCommerz Example for Android
package com.example.sslcexample;
import android.os.Bundle;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.snackbar.Snackbar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
@rkbi
rkbi / 1-zypper.sh
Last active October 13, 2020 11:57
Configure New OpenSuse Tumbleweed
sudo zypper install git zsh;
chsh -s /usr/bin/zsh;
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)";
nano ~/.zshrc; # set ZSH_THEME="lambda";
sudo rpm -v --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg ;
sudo zypper addrepo -g -f https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo ;
sudo zypper addrepo https://repo.skype.com/rpm/stable/skype-stable.repo ;
sudo zypper ar https://repo.vivaldi.com/archive/vivaldi-suse.repo
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc ;
@rkbi
rkbi / index.js
Last active December 2, 2020 19:46
SSLCommerz Example for Node.js
// Make sure to install open with "npm install open" first
const SSLCzData = require("./SSLCzData");
const PublicSslCommerzPayment = require("./PublicSslCommerzPayment");
const open = require('open');
class SSLCommerzPayment extends PublicSslCommerzPayment {
constructor(data, live) {
const newdata = new SSLCzData(data);
super(newdata.getPaymentArray(), live);