Download the PHP package pepco-api/php-rest-sdk without Composer
On this page you can find all versions of the php package pepco-api/php-rest-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pepco-api/php-rest-sdk
More information about pepco-api/php-rest-sdk
Files in pepco-api/php-rest-sdk
Package php-rest-sdk
Short Description PHP package to connect your application to Pasargad Internet Payment Gateway through RESTful API
License Apache-2.0
Homepage https://github.com/pepco-api/php-rest-sdk
Informations about the package php-rest-sdk
Pasargad php-rest-sdk
PHP package to connect your application to Pasargad Internet Payment Gateway through RESTful API
Installation
For installation, use composer
package:
Usage
- To Read API Documentation, Click Here! (دانلود مستندات کامل درگاه پرداخت)
- Save your private key into an
.xml
file inside your project directory.
Redirect User to Payment Gateway
Checking and Verifying Transaction
After Payment Process, User is going to be returned to your redirect_url.
payment gateway is going to answer the payment result with sending below parameters to your redirectURL (as QueryString
parameters):
- InvoiceNumber (IN field)
- InvoiceDate (ID field)
- TransactionReferenceID (tref field)
Store this information in a proper data storage and let's check transaction result by sending a check api request to the Bank:
Successful result is a PHP array:
If you got IsSuccess
with true
value, so everything is O.K! otherwise, you will get an Exception.
Now, for your successful transaction, you should call verifyPayment()
method to keep the money and Bank makes sure the checking process was done properly:
...and the successful response, is an array:
Payment Refund
If for any reason, you decided to cancel an order in early hours after taking the order (maximum 2 hours later), you can refund the client payment to his/her bank card.
for this, use refundPayment()
method:
Support
Please use your credentials to login into Support Panel
Contact Author/Maintainer: Reza Seyf