Pay-ePay Express Payment Gateway Documentation

Payer

If payer wants to fund payments using Pay-ePay, set payer to Pay-ePay.
(Other payment method ex: paypal, stripe, coinpayments etc not available yet).

Amount

Specify a payment amount and the currency.

Transaction

It’s a Transaction resource where amount object has to set.

RedirectUrls

Set the urls where buyer should redirect after transaction is completed or cancelled.

Payment

It’s a payment resource where all Payer, Amount, RedirectUrls and Credentials of merchant (Client ID and Client Secret) have to set. After initialized into Payment object, need to call create method. It will generate a redirect URL. Users have to redirect into this URL to complete the transaction.


Installation Instruction :

Click download for the package download

Now, go to php-sdk/src/Pay-ePay/Rest/Connection.php, then change BASE_URL value to your domain name
(i.e: If the domain is - 'your-domain.com' then, define( 'BASE_URL' , 'http://your-domain.com/' ) )

Example :
    require 'vendor/autoload.php';

    //Contact us if you have a difficult issue

    use Pay-ePay\Api\Payer;
    use Pay-ePay\Api\Amount;
    use Pay-ePay\Api\Transaction;
    use Pay-ePay\Api\RedirectUrls;
    use Pay-ePay\Api\Payment;

    //Payer Object
    $payer = new Payer();
    $payer->setPaymentMethod('Pay-ePay'); Our system name, Dot not change it

    //Amount Object
    $amountIns = new Amount();
    $amountIns->setTotal(20)->setCurrency('USD'); //must give a valid currency code and must exist in merchant wallet list

    //Transaction Object
    $trans = new Transaction();
    $trans->setAmount($amountIns);

    //RedirectUrls Object
    $urls = new RedirectUrls();
    $urls->setSuccessUrl('http://your-merchant-domain.com/example-success.php') //success url - the merchant domain page,
    to redirect after successful payment, see sample example-success.php file in sdk root,
    example - http://pay-epay.com/Pay-ePay_sdk/example-success.php
    ->setCancelUrl('http://your-merchant-domain.com/'); //cancel url - the merchant domain page, to redirect after
    cancellation of payment, example -  http://pay-epay.com/Pay-ePay_sdk/

    //Payment Object
    $payment = new Payment();
    $payment->setCredentials([ //client id & client secret, see merchants->setting(gear icon)
    'client_id' => 'place your client id here', //must provide correct client id of an express merchant
    'client_secret' => 'place your client secret here' //must provide correct client secret of an express merchant
    ])->setRedirectUrls($urls)
    ->setPayer($payer)
    ->setTransaction($trans);

    try {
     $payment->create(); //create payment
     header("Location: ".$payment->getApprovedUrl()); //checkout url
    } catch (\Exception $ex) {
     print $ex;
     exit;
    }

Optional Instructions


If you don't see changes after configuring and extracting SDK, go to your SDK root and run the commands below:-

composer clear-cache

composer install

composer dump-autoload



Our Society

PAY-ePAY

Is a service that enables you to pay, send and received money, and accept payments. You can pay by simply choosing PAY-ePAY at checkout, logging into your PAY-ePAY account, and confirming your payment. We complete the process for you.

Language

Pay-ePay