karen6630 / omnipay-ameria
Ameria gateway for Omnipay payment processing library
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/karen6630/omnipay-ameria
Requires
- php: 8.*
- ext-json: *
- omnipay/common: ^3
Requires (Dev)
- omnipay/tests: ^3
This package is auto-updated.
Last update: 2025-12-12 19:04:48 UTC
README
Ameria driver for the Omnipay Laravel payment processing library
Added the ability to cancel payment (CancelRequest) and refund payment (RefundRequest)
Omnipay is a framework agnostic, multi-gateway payment processing library for PHP 5.5+. This package implements Ameria support for Omnipay.
Installation
Omnipay is installed via Composer. To install, simply add it
to your composer.json file:
{
"require": {
"karen6630/omnipay-ameria": "dev-master"
}
}
And run composer to update your dependencies:
composer update
Or you can simply run:
composer require karen6630/omnipay-ameria
Basic Usage
- Use Omnipay gateway class:
use Omnipay\Omnipay;
- Initialize Ameria gateway:
$gateway = Omnipay::create('Ameria'); $gateway->setClientId(env('AMERIA_CLIENT_ID')); $gateway->setUsername(env('AMERIA_USERNAME')); $gateway->setPassword(env('AMERIA_PASSWORD')); $gateway->setReturnUrl(env('AMERIA_RETURN_URL')); // Return URL (webhook) $gateway->setLanguage(\App::getLocale()); $gateway->setAmount(10); // Amount to charge $gateway->setTransactionId(XXXX); // Transaction ID from your system
- Call purchase — it will automatically redirect to Ameria's hosted page:
$purchase = $gateway->purchase()->send(); $purchase->redirect();
- Handle the callback request at your
AMERIA_RESULT_URL:
$gateway = Omnipay::create('Ameria'); $gateway->setUsername(env('AMERIA_USERNAME')); $gateway->setPassword(env('AMERIA_PASSWORD')); $purchase = $gateway->getOrderStatus()->send(); if ($purchase->isSuccessful()) { // Your logic here } return new Response('OK');
- Added the ability to cancel payment (CancelRequest):
public function cancel(array $parameters = []): \Omnipay\Common\Message\AbstractRequest { return $this->createRequest('\Omnipay\Ameria\Message\CancelRequest', $parameters); }
- Added the ability to refund payment (RefundRequest):
public function refund(array $parameters = []): \Omnipay\Common\Message\AbstractRequest { return $this->createRequest('\Omnipay\Ameria\Message\RefundRequest', $parameters); }
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 — use the omnipay tag.
If you want to stay updated with release announcements or discuss ideas for the project,
you can join the mailing list.