public function request($callbackURL, $Amount, $Description, $Email = null, $Mobile = null, $additionalData = null)
    {
        $inputs = [
            'MerchantID'  => $this->merchantID,
            'CallbackURL' => $callbackURL,
            'Amount'      => $Amount,
            'Description' => $Description,
        ];
        if (!is_null($Email)) {
            $inputs['Email'] = $Email;
        }
        if (!is_null($Mobile)) {
            $inputs['Mobile'] = $Mobile;
        }
        if (!is_null($additionalData)) {
            $inputs['AdditionalData'] = $additionalData;
            $results = $this->driver->requestWithExtra($inputs);
        } else {
            $results = $this->driver->request($inputs);
        }

        if (empty($results['Authority'])) {
            $results['Authority'] = null;
        }
        $this->Authority = $results['Authority'];

        return $results;
    }
public function request($callbackURL, $Amount, $Description, $Email = null, $Mobile = null, $additionalData = null)
    {
        $inputs = [
            'MerchantID'  => $this->merchantID,
            'CallbackURL' => $callbackURL,
            'Amount'      => $Amount,
            'Description' => $Description,
        ];
        if (!is_null($Email)) {
            $inputs['Email'] = $Email;
        }
        if (!is_null($Mobile)) {
            $inputs['Mobile'] = $Mobile;
        }
        if (!is_null($additionalData)) {
            $inputs['AdditionalData'] = $additionalData;
            $results = $this->driver->requestWithExtra($inputs);
        } else {
            $results = $this->driver->request($inputs);
        }

        if (empty($results['Authority'])) {
            $results['Authority'] = null;
        }
        $this->Authority = $results['Authority'];

        return $results;
    }
public function request ( $ callbackURL , $ Amount , $ Description , $ Email = null , $ Mobile = null , $ additionalData = null ) { $ inputs = [ 'MerchantID' => $ this -> merchantID , 'CallbackURL' => $ callbackURL , 'Amount' => $ Amount , 'Description' => $ Description , ] ; if ( ! is_null ( $ Email ) ) { $ inputs [ 'Email' ] = $ Email ; } if ( ! is_null ( $ Mobile ) ) { $ inputs [ 'Mobile' ] = $ Mobile ; } if ( ! is_null ( $ additionalData ) ) { $ inputs [ 'AdditionalData' ] = $ additionalData ; $ results = $ this -> driver -> requestWithExtra ( $ inputs ) ; } else { $ results = $ this -> driver -> request ( $ inputs ) ; } if ( empty ( $ results [ 'Authority' ] ) ) { $ results [ 'Authority' ] = null ; } $ this -> Authority = $ results [ 'Authority' ] ; return $ results ; }
send request for money to zarinpal
and redirect if there was no error.

@param string $callbackURL
@param string $Amount
@param string $Description
@param string $Email
@param string $Mobile
@param null   $additionalData

@return array|@redirect
send request for money to zarinpal and redirect if there was no error .