shopid / idpay
1.0.1
2022-07-15 07:58 UTC
This package is not auto-updated.
Last update: 2024-12-14 17:49:02 UTC
README
Installation
composer require shopid/idpay
on virgool.io :
<?php //make idpay object $idpay = new idPay(["apiKey"=>"6a7f99eb-7c20-4412-a972-6dfb7cd253a4","sandbox"=>true]); //make a request try { $req = $idpay->apiRequest([ "order_id" => "1123", "amount" => 2000, "callback" => "https://www.mywebsite.com/", "name" => "shopid", "phone" => "09120000000", "mail" => "aa@gmail.com", "desc" => "order 1123", ]); print_r(json_decode($req)); } catch (Exception $error) { print_r(json_decode($error->getMessage())); } //verify peyment try { $verify = $idpay->verify( [ "order_id" => "1123", "id" => "350130d9fc8b5b569fecb600538f7e72", ] ); var_dump(json_decode($verify)); } catch (Exception $error) { print_r(json_decode($error->getMessage())); } ?>