定制 paygateglobal/paygate-php 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

paygateglobal/paygate-php

最新稳定版本:1.0.5

Composer 安装命令:

composer require paygateglobal/paygate-php

包简介

Sdk php pour PaygateGlobal

README 文档

README

Raw Files

    git clone https://github.com/Edouardsnipeur/paygate-php.git

Installing

Using composer:

    composer require paygateglobal/paygate-php

Initialization

Production

    $paygate = new \Paygate\Paygate($auth_token);

Request to schedule payout

EXAMPLE API Method

    
    // Example to schedule payout API Method
    $response = $paygate->payNow(
        phone_number : "99000000",
        amount : 1000,
        identifier : "993",
        network : \Paygate\Network::FLOOZ,
        description : "My description", //Optionnal
    );
        

EXAMPLE redirect Method

    // Example to schedule payout redirect Method
    $paygate->redirectPayNow(
        phone_number : "99000000", //Optionnal
        amount : 1000,
        identifier : "993",
        url : "http://exemple.com", //Optionnal
        description : "My description", //Optionnal
    );
        
PARAMETERS DESCRIPTION
phone_number Numéro de téléphone mobile du Client
amount Montant de la transaction sans la devise (Devise par défaut: FCFA)
identifier Identifiant interne de la transaction de l’e-commerce. Cet identifiant doit etre unique.
network valeurs possibles: \Paygate\Network::FLOOZ, \Paygate\Network::TMONEY
url Lien de la page vers laquelle le client sera redirigé après le paiement

TRANSACTION $response Object

Nom DESCRIPTION
tx_reference Identifiant Unique générée par PayGateGlobal pour la transaction
status Code d’état de la transaction.

TRANSACTION POSSIBLE STATUS LIST

STATUS DESCRIPTION
SUCCESS Transaction enregistrée avec succès
INVALID_TOKEN Jeton d’authentification invalide
INVALID_PARAMS Paramètres Invalides
DOUBLONS This transaction are already reverted or are not eligible
INTERNAL_ERROR Doublons détectées. Une transaction avec le même identifiant existe déja.

TRANSACTION VERIFICATION EXAMPLE

switch ($response->status) {
    case \Paygate\TransactionStatus::SUCCESS
        //...
        break;
    case \Paygate\TransactionStatus::INVALID_TOKEN:
        //...
        break;
    case \Paygate\TransactionStatus::INVALID_PARAMS:
        //...
        break;
    case \Paygate\TransactionStatus::DOUBLONS:
        //...
        break;
    case \Paygate\TransactionStatus::INTERNAL_ERROR:
        //...
        break;
}
        

Request to retrieve transactions

EXAMPLE

    // Verification with Paygate reference code
    $reponse = $paygate->verifyTransactionWithPaygateReference($tx_reference);

    // Verification with Ecommerce identifier
    $reponse = $paygate->verifyTransactionWithEcommerceId($identifier);
PARAMETERS DESCRIPTION
tx_reference Identifiant Unique générée par PayGateGlobal pour la transaction
identifier Identifiant Unique précédemment généré par l'Ecommerçant pour la transaction

TRANSACTION $response Object

Nom DESCRIPTION
tx_reference Identifiant Unique généré par PayGateGlobal pour la transaction
identifier Identifiant interne de la transaction de l’e-commerce. ex: Numero de commande Cet identifiant doit etre unique.
payment_reference Code de référence de paiement généré par Flooz/TMoney. Ce code peut être utilisé en cas de résolution de problèmes ou de plaintes.
status Code d’état du paiement.
datetime Date et Heure du paiement
payment_method Méthode de paiement utilisée par le client. Valeurs possibles: FLOOZ, T-Money

PAYMENT POSSIBLE STATUS LIST

STATUS DESCRIPTION
SUCCESS Paiement réussi avec succès
PENDING En cours
EXPIRED Expiré
CANCELED Annulé

TRANSACTION VERIFICATION EXAMPLE

switch ($response->status) {
    case \Paygate\PaiementStatus::SUCCESS
        //...
        break;
    case \Paygate\PaiementStatus::PENDING:
        //...
        break;
    case \Paygate\PaiementStatus::EXPIRED:
        //...
        break;
    case \Paygate\PaiementStatus::CANCELED:
        //...
        break;
}

统计信息

  • 总下载量: 34
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-10-09