Giter Club home page Giter Club logo

php-azampay-'s Introduction

Welcome to Wit Azampay PHP SDK

This script covers everything required to collect payments using your Azampay APIS. Azampay involves two aspects, one for pushing a payment request and the other one for receiving callback of the transaction status. This script has /inc/submit.inc.php file which pushes the request when submitted and /azampay_callback.php which receives the callbacks of the transaction from Azampay.

For this script, we have used a database file named database.sql which has only a transactions table. This will be used to compare transactions from the transactions that are received from the callbacks. So let's get started.

Step 1:

  • Configure your database from /classes/db.php and then import the database.sql file from the root folder /
<?php

class db{

private $dbname = "azampay";
private $dbhost = "localhost";
private $dbuser = "root";
private $dbpwd = "";

protected function connect(){

$dsn = 'mysql:host='.$this->dbhost.';dbname='.$this->dbname.'';
$pdo = new PDO($dsn, $this->dbuser, $this->dbpwd);

$pdo->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);
return $pdo;

}




}


?>

Step 2:

  • Setup your Azampay application environment, client id and client secrete from /classes/azampay.php
 //Options are sandbox and production
 private static $environment = "sandbox";
   private static $appName = "App_name";
   private static $clientId = "client_id";
   private static $clientSecret = "client_secrete_here";

Note: On the environment values there are only two possible options(sanbox and production)

After completing the above steps then you are ready to test for Azampay

php-azampay-'s People

Contributors

comfortchambeshi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.