public function setBillingType($billingType = 'MerchantInitiatedBilling')
    {
        $allowedBillingTypes = ['MerchantInitiatedBilling', 'MerchantInitiatedBillingSingleAgreement', 'RecurringPayments'];

        if ($billingType != null && !in_array($billingType, $allowedBillingTypes)) {
            throw new \Exception('Billing type is not supported by PayPal.');
        }

        $this->billingType = $billingType;

        return $this;
    }
public function setBillingType($billingType = 'MerchantInitiatedBilling')
    {
        $allowedBillingTypes = ['MerchantInitiatedBilling', 'MerchantInitiatedBillingSingleAgreement', 'RecurringPayments'];

        if ($billingType != null && !in_array($billingType, $allowedBillingTypes)) {
            throw new \Exception('Billing type is not supported by PayPal.');
        }

        $this->billingType = $billingType;

        return $this;
    }
public function setBillingType ( $ billingType = 'MerchantInitiatedBilling' ) { $ allowedBillingTypes = [ 'MerchantInitiatedBilling' , 'MerchantInitiatedBillingSingleAgreement' , 'RecurringPayments' ] ; if ( $ billingType != null && ! in_array ( $ billingType , $ allowedBillingTypes ) ) { throw new \ Exception ( 'Billing type is not supported by PayPal.' ) ; } $ this -> billingType = $ billingType ; return $ this ; }
Function to set billing type.

@param string $billingType

@throws \Exception

@return $this
Function to set billing type .