public static function QRPayment($options = array())
    {
        $api = new Api\QRPayment();

        if (isset($options['scanData'])) {
            $api->setScanData($options['scanData']);
        }
        if (isset($options['amount'])) {
            $api->setAmount(round($options['amount'] * 100));
        }
        if (isset($options['description'])) {
            $api->setDescription($options['description']);
        }
        if (isset($options['currency'])) {
            $api->setCurrency($options['currency']);
        }
        if (isset($options['statsData'])) {
            $api->setStatsData($options['statsData']);
        }

        $result = $api->doRequest();

        return new Result\QRPayment($result);
    }
public static function QRPayment($options = array())
    {
        $api = new Api\QRPayment();

        if (isset($options['scanData'])) {
            $api->setScanData($options['scanData']);
        }
        if (isset($options['amount'])) {
            $api->setAmount(round($options['amount'] * 100));
        }
        if (isset($options['description'])) {
            $api->setDescription($options['description']);
        }
        if (isset($options['currency'])) {
            $api->setCurrency($options['currency']);
        }
        if (isset($options['statsData'])) {
            $api->setStatsData($options['statsData']);
        }

        $result = $api->doRequest();

        return new Result\QRPayment($result);
    }
public static function QRPayment ( $ options = array ( ) ) { $ api = new Api \ QRPayment ( ) ; if ( isset ( $ options [ 'scanData' ] ) ) { $ api -> setScanData ( $ options [ 'scanData' ] ) ; } if ( isset ( $ options [ 'amount' ] ) ) { $ api -> setAmount ( round ( $ options [ 'amount' ] * 100 ) ) ; } if ( isset ( $ options [ 'description' ] ) ) { $ api -> setDescription ( $ options [ 'description' ] ) ; } if ( isset ( $ options [ 'currency' ] ) ) { $ api -> setCurrency ( $ options [ 'currency' ] ) ; } if ( isset ( $ options [ 'statsData' ] ) ) { $ api -> setStatsData ( $ options [ 'statsData' ] ) ; } $ result = $ api -> doRequest ( ) ; return new Result \ QRPayment ( $ result ) ; }
Charge an alipay or wechat account by scanning a qr code

@param array $options
@return Result\QRPayment
@throws Error\Api
@throws Error\Error
@throws Error\InvalidArgument
Charge an alipay or wechat account by scanning a qr code