Skip to content

PayBy/PayBy-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages