Skip to content

optimisthub/moka-united-ge-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

United Payment Georgia API PHP Client

The United Payment Georgia API PHP Client provides convenient access to the United Payment Georgia API from applications written in the PHP language.

Requirements

  • PHP 7.4 or higher

Installation

You can install the bindings via Composer. Run the following command:

composer require moka-united/moka-united-ge-php

To use the bindings, use Composer's autoload:

require_once('vendor/autoload.php');

Manual Installation

If you do not wish to use Composer, you can download the latest release. Then, to use the bindings, include the autoload.php file.

require_once('autoload.php');

Dependencies

The bindings require the following PHP extensions in order to work properly:

If you use Composer, these dependencies should be handled automatically. If you install manually, you'll want to make sure that these extensions are available.

Getting Started

use MokaUnitedGE\MokaUnitedClient;

$client = new MokaUnitedClient([
    'dealerCode' => '',
    'username' => '',
    'password' => '',
]);

Response Handling

All service calls return a Response object. Common methods:

$response->getStatusCode();
$response->getResultCode();
$response->getResultMessage();
$response->getData();
$response->getBody();
$response->getHeaders();
$response->getException();
$response->isSuccessful();

If isSuccessful() returns true, access the payload via getData().


Payment Service

Create Payment

$client->payments()->create([
    "Amount" => 0.01,
    "Currency" => "GEL",
    "BankCode" => 1,
    "CardToken" => "63F8C2BF-F76D-46C1-BB0E-C699692CB678",
    "InstallmentNumber" => 1,
    "ClientIP" => "203.0.113.21",
    "OtherTrxCode" => "ORDER-20250101-0001",
    "SubMerchantName" => "",
    "IsPoolPayment" => 0,
    "IsPreAuth" => 0,
    "IsTokenized" => 0,
    "IntegratorId" => 0,
    "Software" => "Postman",
    "Description" => "",
    "ReturnHash" => 1,
    "RedirectUrl" => "https://www.unitedpayment.ge/callback?trx=ORDER-20250101-0001",
    "RedirectType" => 0,
    "BuyerInformation" => [
        "BuyerFullName" => "Test User",
        "BuyerGsmNumber" => "5341234567",
        "BuyerEmail" => "email@email.com",
        "BuyerAddress" => "Levent Mah. Meltem Sok...",
    ],
    "CustomerInformation" => [
        "DealerCustomerId" => "",
        "CustomerCode" => "1234",
        "FirstName" => "Test",
        "LastName" => "User",
        "Email" => "test@unitedpayment.ge",
        "CardName" => "My Card"
    ]
]);

Get Payments

$client->payments()->all([
    "PaymentStartDate" => "2025-10-01 00:00",
    "PaymentEndDate" => "2025-11-01 00:00"
]);

Refund Service

Create Refund

$client->refunds()->create([
    "VirtualPosOrderId" => "ORDER-20250101-0001",
    "OtherTrxCode" => "REFUND-20250101-0001",
    "Amount" => 14.25
]);

Card Service

Get Cards

$client->cards()->all([
    "DealerCustomerId" => "",
    "CustomerCode" => "1234"
]);

Create Card

$client->cards()->create([
    "DealerCustomerId" => "",
    "CustomerCode" => "1234",
    "CardHolderFullName" => "Test User",
    "CardNumber" => "4111111111111111",
    "ExpMonth" => "12",
    "ExpYear" => "2026",
    "CardName" => "My Card"
]);

Retrieve Card

$client->cards()->retrieve([
    "CardToken" => "63F8C2BF-F76D-46C1-BB0E-C699692CB678"
]);

Update Card

$client->cards()->update([
    "CardToken" => "63F8C2BF-F76D-46C1-BB0E-C699692CB678",
    "CardName" => "Updated Card Name"
]);

Delete Card

$client->cards()->delete([
    "CardToken" => "63F8C2BF-F76D-46C1-BB0E-C699692CB678"
]);

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages