public function manageMandate(QuoteTransfer $quoteTransfer)
    {
        $manageMandateTransfer = new PayoneManageMandateTransfer();
        $manageMandateTransfer->setBankCountry($quoteTransfer->getPayment()->getPayoneDirectDebit()->getBankcountry());
        $manageMandateTransfer->setBankAccount($quoteTransfer->getPayment()->getPayoneDirectDebit()->getBankaccount());
        $manageMandateTransfer->setBankCode($quoteTransfer->getPayment()->getPayoneDirectDebit()->getBankcode());
        $manageMandateTransfer->setIban($quoteTransfer->getPayment()->getPayoneDirectDebit()->getIban());
        $manageMandateTransfer->setBic($quoteTransfer->getPayment()->getPayoneDirectDebit()->getBic());
        $personalData = new PayonePersonalDataTransfer();
        $customer = $quoteTransfer->getCustomer();
        $billingAddress = $quoteTransfer->getBillingAddress();
        $personalData->setCustomerId($customer->getIdCustomer());
        $personalData->setLastName($billingAddress->getLastName());
        $personalData->setFirstName($billingAddress->getFirstName());
        $personalData->setCompany($billingAddress->getCompany());
        $personalData->setCountry($billingAddress->getIso2Code());
        $personalData->setCity($billingAddress->getCity());
        $personalData->setStreet($billingAddress->getAddress1());
        $personalData->setZip($billingAddress->getZipCode());
        $personalData->setEmail($billingAddress->getEmail() ?? $customer->getEmail());
        $manageMandateTransfer->setPersonalData($personalData);

        return $this->getFactory()->createZedStub()->manageMandate($manageMandateTransfer);
    }
public function manageMandate(QuoteTransfer $quoteTransfer)
    {
        $manageMandateTransfer = new PayoneManageMandateTransfer();
        $manageMandateTransfer->setBankCountry($quoteTransfer->getPayment()->getPayoneDirectDebit()->getBankcountry());
        $manageMandateTransfer->setBankAccount($quoteTransfer->getPayment()->getPayoneDirectDebit()->getBankaccount());
        $manageMandateTransfer->setBankCode($quoteTransfer->getPayment()->getPayoneDirectDebit()->getBankcode());
        $manageMandateTransfer->setIban($quoteTransfer->getPayment()->getPayoneDirectDebit()->getIban());
        $manageMandateTransfer->setBic($quoteTransfer->getPayment()->getPayoneDirectDebit()->getBic());
        $personalData = new PayonePersonalDataTransfer();
        $customer = $quoteTransfer->getCustomer();
        $billingAddress = $quoteTransfer->getBillingAddress();
        $personalData->setCustomerId($customer->getIdCustomer());
        $personalData->setLastName($billingAddress->getLastName());
        $personalData->setFirstName($billingAddress->getFirstName());
        $personalData->setCompany($billingAddress->getCompany());
        $personalData->setCountry($billingAddress->getIso2Code());
        $personalData->setCity($billingAddress->getCity());
        $personalData->setStreet($billingAddress->getAddress1());
        $personalData->setZip($billingAddress->getZipCode());
        $personalData->setEmail($billingAddress->getEmail() ?? $customer->getEmail());
        $manageMandateTransfer->setPersonalData($personalData);

        return $this->getFactory()->createZedStub()->manageMandate($manageMandateTransfer);
    }
public function manageMandate ( QuoteTransfer $ quoteTransfer ) { $ manageMandateTransfer = new PayoneManageMandateTransfer ( ) ; $ manageMandateTransfer -> setBankCountry ( $ quoteTransfer -> getPayment ( ) -> getPayoneDirectDebit ( ) -> getBankcountry ( ) ) ; $ manageMandateTransfer -> setBankAccount ( $ quoteTransfer -> getPayment ( ) -> getPayoneDirectDebit ( ) -> getBankaccount ( ) ) ; $ manageMandateTransfer -> setBankCode ( $ quoteTransfer -> getPayment ( ) -> getPayoneDirectDebit ( ) -> getBankcode ( ) ) ; $ manageMandateTransfer -> setIban ( $ quoteTransfer -> getPayment ( ) -> getPayoneDirectDebit ( ) -> getIban ( ) ) ; $ manageMandateTransfer -> setBic ( $ quoteTransfer -> getPayment ( ) -> getPayoneDirectDebit ( ) -> getBic ( ) ) ; $ personalData = new PayonePersonalDataTransfer ( ) ; $ customer = $ quoteTransfer -> getCustomer ( ) ; $ billingAddress = $ quoteTransfer -> getBillingAddress ( ) ; $ personalData -> setCustomerId ( $ customer -> getIdCustomer ( ) ) ; $ personalData -> setLastName ( $ billingAddress -> getLastName ( ) ) ; $ personalData -> setFirstName ( $ billingAddress -> getFirstName ( ) ) ; $ personalData -> setCompany ( $ billingAddress -> getCompany ( ) ) ; $ personalData -> setCountry ( $ billingAddress -> getIso2Code ( ) ) ; $ personalData -> setCity ( $ billingAddress -> getCity ( ) ) ; $ personalData -> setStreet ( $ billingAddress -> getAddress1 ( ) ) ; $ personalData -> setZip ( $ billingAddress -> getZipCode ( ) ) ; $ personalData -> setEmail ( $ billingAddress -> getEmail ( ) ?? $ customer -> getEmail ( ) ) ; $ manageMandateTransfer -> setPersonalData ( $ personalData ) ; return $ this -> getFactory ( ) -> createZedStub ( ) -> manageMandate ( $ manageMandateTransfer ) ; }
Performs ManageMandate request to Payone API.

@api

@param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer

@return \Generated\Shared\Transfer\PayoneManageMandateTransfer
Performs ManageMandate request to Payone API .