Posts

app_key = $bkash_app_key; $this->app_secret = $bkash_app_secret; $this->username = $bkash_username; $this->password = $bkash_password; $this->base_url = $bkash_base_url; } public function getToken() { session()->forget('bkash_token'); $post_token = array( 'app_key' => $this->app_key, 'app_secret' => $this->app_secret ); $url = curl_init("$this->base_url/checkout/token/grant"); $post_token = json_encode($post_token); $header = array( 'Content-Type:application/json', "password:$this->password", "username:$this->username" ); curl_setopt($url, CURLOPT_HTTPHEADER, $header); curl_setopt($url, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($url, CURLOPT_RETURNTRANSFER, true); curl_setopt($url, CUR