behzadbabaei / omnipay-payop
PayOp driver for the Omnipay payment processing library
Requires
- php: ^7.2|^8
- ext-json: *
- omnipay/common: ^3
Requires (Dev)
- omnipay/tests: ^3
This package is auto-updated.
Last update: 2024-10-24 13:32:15 UTC
README
PayOp gateway for Omnipay payment processing library This package has implemented the Merchant API of PayOp Payment systems For more information please visit the following link:Developer Document
Installation
Omnipay is installed via Composer. To install, simply add it
to your composer.json
file:
{ "require": { "behzadbabaei/omnipay-payop": "dev-master" } }
And run composer to update your dependencies:
composer update
Or you can simply run
composer require behzadbabaei/omnipay-payop
Basic Usage
- Use Omnipay gateway class:
use Omnipay\Omnipay;
- Initialize PayOp gateway:
$gateway = Omnipay::create('Payop'); $gateway->setAccessToken('Access-Token'); $gateway->setLanguage('EN'); // Language
Creating an order
Call purchase, it will return the response which includes the public_id for further process. Please refer to the Developer Document for more information.
$purchase = $gateway->purchase(); $purchase->setAmount(12.12); $result = $purchase->send()->getData();
OR
$result1 = $gateway->purchase([ 'amount' => 12.12, 'currency' => 'USD', 'description' => 'order test', ])->send()->getData();
Retrieve an order
Please refer to the Developer Document for more information.
$fetch = $gateway->fetchTransaction(); $fetch->setOrderId(1); $result1 = $fetch->send()->getData();
OR
$result = $gateway->fetchTransaction([ 'orderId' => 1, ])->send()->getData();
For general usage instructions, please see the main Omnipay repository.
Support
If you are having general issues with Omnipay, we suggest posting on Stack Overflow. Be sure to add the omnipay tag so it can be easily found.
If you want to keep up to date with release announcements, discuss ideas for the project, or ask more detailed questions, there is also a mailing list which you can subscribe to.
If you believe you have found a bug, please report it using the GitHub issue tracker, or better yet, fork the library and submit a pull request.