src/Mpesa/Transaction/Reversal.php
/**
     * Initiate  transaction reversal request transaction.
     *
     * @return mixed
     */
Initiate  transaction reversal request transaction.
@return mixed
Initiate transaction reversal request transaction . @return mixed
public function reverse($transaction, $number, $amount)
    {
        $paybill    = $this->engine->config->get('mpesa.paybill_number');
        $initiator  = $this->engine->config->get('mpesa.initiator');
        $credential = (new Generator($this->engine))->generate();
        $body       = [
            'Initiator'              => $initiator,
            'SecurityCredential'     => $credential,
            'CommandID'              => 'TransactionReversal',
            'TransactionID'          => $transaction,
            'Amount'                 => $amount,
            'ReceiverParty'          => $number,
            'RecieverIdentifierType' => '4',
            'Remarks'                => 'Transaction reversal request',
            'QueueTimeOutURL'        => $this->callback('mpesa.queue_timeout_callback'),
            'ResultURL'              => $this->callback('mpesa.reversal_result_url'),
        ];
        return $this->handleRequest($body);
    }
public function reverse ( $ transaction , $ number , $ amount ) { $ paybill = $ this -> engine -> config -> get ( 'mpesa.paybill_number' ) ; $ initiator = $ this -> engine -> config -> get ( 'mpesa.initiator' ) ; $ credential = ( new Generator ( $ this -> engine ) ) -> generate ( ) ; $ body = [ 'Initiator' => $ initiator , 'SecurityCredential' => $ credential , 'CommandID' => 'TransactionReversal' , 'TransactionID' => $ transaction , 'Amount' => $ amount , 'ReceiverParty' => $ number , 'RecieverIdentifierType' => '4' , 'Remarks' => 'Transaction reversal request' , 'QueueTimeOutURL' => $ this -> callback ( 'mpesa.queue_timeout_callback' ) , 'ResultURL' => $ this -> callback ( 'mpesa.reversal_result_url' ) , ] ; return $ this -> handleRequest ( $ body ) ; }
Initiate  transaction reversal request transaction.
Initiate transaction reversal request transaction .