Skip to content

CurrencyCode is missing in the request  #3

@Moustafa22

Description

@Moustafa22

Hello Izal,

In TapBilling.php file, there is a missing parameter (CurrencyCode) in buildMerchant function when creating the merchant object.

I traced it when redirecting to the gateway it returns invalid currency code, so I debugged your package and i found that the currency code is missing in the request.

the buildMerchant() function should be like this:

    private function buildMerchant() {

        $hashString = $this->generateHash();

        $merchant = array_merge($this->merchantInfo,[
            'MerchantID' => $this->MerchantID,
            'UserName' => $this->UserName,
            'Password' => $this->Password,
            'AutoReturn' => $this->AutoReturn,
            'LangCode' => $this->LangCode,
            'ReferenceID' => $this->merchantInfo['ReferenceID'],
            'CurrencyCode' => $this->CurrencyCode, // EDIT
            'ReturnURL' => $this->merchantInfo['ReturnURL'],
            'HashString' => $hashString
        ]);

        return $merchant;
    }

Correct me if i am wrong please.

Nice Package BTW.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions