Skip to content
/ PayBy-php Public template
forked from PayBy/PayBy-php

PayBy Payment Gateway integration SDK for php

License

Notifications You must be signed in to change notification settings

MIHAMMEDQATA/PayBy-php

 
 

Repository files navigation

PayBy PHP SDK

Introduce

payby.com

Env

PHP >= 5.6

Installation

By Composer

composer require payby/payby-php

Composer autoload import

require_once('vendor/autoload.php');

Manual import

require_once('/path/to/payby-php/init.php');

Api

Initial

\PayBy\PayBy::setPrivateKey('YOUR-KEY');

Order

Create an order

\PayBy\Api\Order::placeOrder(
        [
            "merchantOrderNo" => $order_no,
            "subject" => "iPhone",
            'totalAmount' => [
	            'currency' => 'AED',
	            'amount' => '0.3',
	        ],
            "paySceneCode" => "DYNQR",
            "notifyUrl" => "http://yoursite.com/api/notification",
            "accessoryContent" => [
	            'amountDetail' => [
	            	'vatAmount' => [
		            	'currency' => 'AED',
		            	'amount' => '0.3',
		            ],
	            ],
	            'goodsDetail' => [
	            	'body' => 'Gifts',
	            	'goodsName' => 'candy flower',
	            	'goodsId' => 'GI1005',
	            ],
	            'terminalDetail' => [
	            	'merchantName' => 'candy home',
	            ],
            ],
        ]
    );

cancelOrder

\PayBy\Api\Order::placeOrder();

getOrder

\PayBy\Api\Order::getOrder();

Refund

placeOrder

\PayBy\Api\Refund::placeOrder();

getOrder

\PayBy\Api\Refund::getOrder();

Transfer

placeTransferOrder

\PayBy\Api\Transfer::placeTransferOrder();

getTransferOrder

\PayBy\Api\Transfer::getTransferOrder();

placeTransferToBankOrder

\PayBy\Api\Transfer::placeTransferToBankOrder();

getTransferToBankOrder

\PayBy\Api\Transfer::getTransferToBankOrder();

Result notification

Verify signature

// TODO

About

PayBy Payment Gateway integration SDK for php

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%