PHP code example of lamine-minato / orange-money-gateway

1. Go to this page and download the library: Download lamine-minato/orange-money-gateway library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

lamine-minato / orange-money-gateway example snippets


$action = new OrangeMoneyAction(
    orangeBearer: "bearer",
    merchantKey: "merchantKey",
    currency: OrangeMoneyCurrency::XOF,
    amount: 10000,
    returnUrl: "https://api.example.com/return",
    cancelUrl: "https://api.example.com/cancel",
    notifUrl: "https://api.example.com/notif",
    lang: "fr",
    reference: "Minato"
);

$response = OrangeMoneyGateway::execute($action);

$action = new OrangeMoneyAction(...);

$config = new OrangeMoneyConfig(
    tokenUrl: "https://api.orange.com/oauth/v3/token",
    proccessUrl: "https://api.orange.com/orange-money-webpay/ml/v1/webpayment",
)

$response = OrangeMoneyGateway::execute($action, $config);