setMiddleName() public method

Middle name of the payer.
public setMiddleName ( string $middle_name )
$middle_name string
コード例 #1
0
 /**
  * Build PayerInfo for Payer
  *
  * @param $quote
  * @return PayerInfo
  */
 protected function buildPayerInfo($quote)
 {
     $payerInfo = new PayerInfo();
     $address = $quote->getBillingAddress();
     if ($address->getFirstname()) {
         $payerInfo->setFirstName($address->getFirstname());
     }
     if ($address->getMiddlename()) {
         $payerInfo->setMiddleName($address->getMiddlename());
     }
     if ($address->getLastname()) {
         $payerInfo->setLastName($address->getLastname());
     }
     $billingAddress = $this->buildBillingAddress($quote);
     if ($billingAddress) {
         $payerInfo->setBillingAddress($billingAddress);
     }
     return $payerInfo;
 }