public function sendPreApprovalRequest(array $preApprovalRequest)
    {
        $preApprovalRequest = [
            'email'                             => $this->email,
            'token'                             => $this->token,
            'preApprovalName'                   => $this->sanitize($preApprovalRequest, 'preApprovalName'),
            'preApprovalCharge'                 => $this->sanitize($preApprovalRequest, 'preApprovalCharge'),
            'preApprovalPeriod'                 => $this->sanitize($preApprovalRequest, 'preApprovalPeriod'),
            'preApprovalCancelUrl'              => $this->sanitize($preApprovalRequest, 'preApprovalCancelUrl'),
            'preApprovalAmountPerPayment'       => $this->sanitizeMoney($preApprovalRequest, 'preApprovalAmountPerPayment'),
            'preApprovalMembershipFee'          => $this->sanitizeMoney($preApprovalRequest, 'preApprovalMembershipFee'),
            'preApprovalTrialPeriodDuration'    => $this->sanitizeNumber($preApprovalRequest, 'preApprovalTrialPeriodDuration'),
            'preApprovalExpirationValue'        => $this->sanitizeNumber($preApprovalRequest, 'preApprovalExpirationValue'),
            'preApprovalExpirationUnit'         => $this->sanitize($preApprovalRequest, 'preApprovalExpirationUnit'),
            'maxUses'                           => $this->sanitizeNumber($preApprovalRequest, 'maxUses'),
            'reference'                         => $this->reference,
        ];

        $this->validatePreApprovalRequest($preApprovalRequest);

        return (string) $this->sendTransaction($preApprovalRequest, $this->url['preApprovalRequest'])->code;
    }
public function sendPreApprovalRequest(array $preApprovalRequest)
    {
        $preApprovalRequest = [
            'email'                             => $this->email,
            'token'                             => $this->token,
            'preApprovalName'                   => $this->sanitize($preApprovalRequest, 'preApprovalName'),
            'preApprovalCharge'                 => $this->sanitize($preApprovalRequest, 'preApprovalCharge'),
            'preApprovalPeriod'                 => $this->sanitize($preApprovalRequest, 'preApprovalPeriod'),
            'preApprovalCancelUrl'              => $this->sanitize($preApprovalRequest, 'preApprovalCancelUrl'),
            'preApprovalAmountPerPayment'       => $this->sanitizeMoney($preApprovalRequest, 'preApprovalAmountPerPayment'),
            'preApprovalMembershipFee'          => $this->sanitizeMoney($preApprovalRequest, 'preApprovalMembershipFee'),
            'preApprovalTrialPeriodDuration'    => $this->sanitizeNumber($preApprovalRequest, 'preApprovalTrialPeriodDuration'),
            'preApprovalExpirationValue'        => $this->sanitizeNumber($preApprovalRequest, 'preApprovalExpirationValue'),
            'preApprovalExpirationUnit'         => $this->sanitize($preApprovalRequest, 'preApprovalExpirationUnit'),
            'maxUses'                           => $this->sanitizeNumber($preApprovalRequest, 'maxUses'),
            'reference'                         => $this->reference,
        ];

        $this->validatePreApprovalRequest($preApprovalRequest);

        return (string) $this->sendTransaction($preApprovalRequest, $this->url['preApprovalRequest'])->code;
    }
public function sendPreApprovalRequest ( array $ preApprovalRequest ) { $ preApprovalRequest = [ 'email' => $ this -> email , 'token' => $ this -> token , 'preApprovalName' => $ this -> sanitize ( $ preApprovalRequest , 'preApprovalName' ) , 'preApprovalCharge' => $ this -> sanitize ( $ preApprovalRequest , 'preApprovalCharge' ) , 'preApprovalPeriod' => $ this -> sanitize ( $ preApprovalRequest , 'preApprovalPeriod' ) , 'preApprovalCancelUrl' => $ this -> sanitize ( $ preApprovalRequest , 'preApprovalCancelUrl' ) , 'preApprovalAmountPerPayment' => $ this -> sanitizeMoney ( $ preApprovalRequest , 'preApprovalAmountPerPayment' ) , 'preApprovalMembershipFee' => $ this -> sanitizeMoney ( $ preApprovalRequest , 'preApprovalMembershipFee' ) , 'preApprovalTrialPeriodDuration' => $ this -> sanitizeNumber ( $ preApprovalRequest , 'preApprovalTrialPeriodDuration' ) , 'preApprovalExpirationValue' => $ this -> sanitizeNumber ( $ preApprovalRequest , 'preApprovalExpirationValue' ) , 'preApprovalExpirationUnit' => $ this -> sanitize ( $ preApprovalRequest , 'preApprovalExpirationUnit' ) , 'maxUses' => $ this -> sanitizeNumber ( $ preApprovalRequest , 'maxUses' ) , 'reference' => $ this -> reference , ] ; $ this -> validatePreApprovalRequest ( $ preApprovalRequest ) ; return ( string ) $ this -> sendTransaction ( $ preApprovalRequest , $ this -> url [ 'preApprovalRequest' ] ) -> code ; }
Define os dados do plano.

@param array $preApprovalRequest

@return \SimpleXMLElement
Define os dados do plano .