Posts

Redsys Payment gateway intergration Request

Image
Generate Request with Redsys To setup Redsys payment gateway you must have DS MERCHANT MERCHANTCODE and MERCHANT TERMINAL . to make request you have to specify the transaction detail like amount , currency type and you also have specify 1 merchanturl: where redsys hit the response 2 merchant_urlok : page to redirect after successful transaction 3 merchant_urlko: page to redirect after error or unsuccessful transaction Use this code. Change the basic detail with your redsys merchant detail include 'redsys/ApiRedsys.php';         $miObj = new RedsysAPI;         $GlobalsRedsys=Globals::getredsys();              $miObj->setParameter("DS_MERCHANT_AMOUNT",$europrice);     $miObj->setParameter("DS_MERCHANT_ORDER",$order );     $miObj->setParameter("DS_MERCHANT_MERCHANTCODE",$GlobalsRedsys['DS_MERCHANT_MERCHANTCODE...

Bitcoin Final Step

After the payment transaction complete you will get the data in your application in json format . At the time request you have to mention : callbackurl success url  cancel url                                                                              so that after transaction completion it will revert you data in that page. Therefore you can collect it from there. Put this $data = json_decode(file_get_contents('php://input')); Note : Let me tell you very important thing. if you print $data then it won't the result because it is hidden. You need to put data in file and save it at your ser...

Cubit/Bitcoin With curl function

Image
Using Curl same function you have to go the same functionality but here in addition u need to generate nonce and signature.  To start with bitcoin or cubit you need to generate cubits_key and cubits_secret from your merchant account. To use the cubits api you need three things or All requests to the API MUST include the following headers for authentication: Cubits-Key: ... Cubits-Nonce: ... Cubits-Signature: ...  here is the code of bitcoin and cubit integration with using curl function   <?php     $url = 'https://api.cubits.com/';     ini_set('display_errors', 1);     $name = "test";     $path = "/api/v1/invoices";     $url = $url.$path;     $fields = array(           "currency"=>"EUR", "price"=> "266.45", "name"=> "shankit sharma", "description"=> "Twelve ounces of high quality, organic Guatemalan...

Cubit payment gateway

Image
To start with cubit you need to generate cubits_key and cubits_secret from your merchant account. To use the cubits api you need three things or All requests to the API MUST include the following headers for authentication: Cubits-Key: ... Cubits-Nonce: ... Cubits-Signature: ... Steps for cubit integration is  Request and Response method Create Invoice  Callback/Channel to get response              ini_set('display_errors', 1);             require_once('cubits/lib/Cubits.php');               Cubits::configure("https://pay.cubits.com/api/v1/", false);        $cubits = Cubits::withApiKey($API_KEY,$API_SECRET);         $var="0.29";   $response = $cubits->createInvoice("Gold Purchase of ".$weight." gm",$var, "GB...