getEmail() 공개 메소드

Get the cardholder's email address.
public getEmail ( ) : string
리턴 string
예제 #1
0
 /**
  * (non-PHPdoc)
  *
  * @see \Omnipay\Common\Message\MessageInterface::getData()
  */
 public function getData()
 {
     // PaymentMethod independant checks
     $this->validate('transactionReference', 'currency', 'siteId', 'amount', 'description', 'returnUrl', 'notifyUrl', 'ipaddress');
     // PaymentMethod specific checks
     $this->validatePaymentMethodSpecific();
     // Transaction data
     $data = array('ref' => $this->getTransactionReference(), 'currency' => $this->getCurrency(), 'site_id' => $this->getSiteId(), 'amount' => $this->getAmountInteger(), 'description' => $this->getDescription(), 'control_url' => $this->getNotifyUrl(), 'return_url' => $this->getReturnUrl(), 'return_url_failed' => $this->getCancelUrl(), 'ip_address' => $this->getIpAddress(), 'language' => $this->getLanguage());
     if ($this->getPaymentMethod() == 'ideal') {
         $data['issuer_id'] = $this->getIssuer();
     }
     // Customer data
     $customerData = new CreditCard($_POST);
     if ($customerData && strlen($customerData->getFirstName()) && strlen($customerData->getLastName())) {
         $data['customer'] = array('first_name' => $customerData->getFirstName(), 'last_name' => $customerData->getLastName(), 'company_name' => $customerData->getCompany(), 'address' => $customerData->getAddress1(), 'city' => $customerData->getCity(), 'state' => $customerData->getState(), 'postal_code' => $customerData->getPostcode(), 'country_code' => $customerData->getCountry(), 'phone_number' => $customerData->getPhone(), 'email' => $customerData->getEmail());
     }
     return $data;
 }
 /**
  * Fills the card information
  *
  * @param SimpleXMLElement $data
  * @param CreditCard       $card
  */
 private function appendCustomerDetailsCard(SimpleXMLElement $data, CreditCard $card)
 {
     $data->customer_details[0]['salutation'] = $card->getGender();
     $data->customer_details[0]['title'] = $card->getBillingTitle();
     $data->customer_details[0]['firstName'] = $card->getBillingFirstName();
     $data->customer_details[0]['lastName'] = $card->getBillingLastName();
     $data->customer_details[0]['street'] = $card->getBillingAddress1();
     $data->customer_details[0]['streetNo'] = null;
     $data->customer_details[0]['addressAddition'] = $card->getBillingAddress2();
     $data->customer_details[0]['zip'] = $card->getBillingPostcode();
     $data->customer_details[0]['city'] = $card->getBillingCity();
     $data->customer_details[0]['country'] = $this->getCountryCode($card->getBillingCountry());
     $data->customer_details[0]['email'] = $card->getEmail();
     $data->customer_details[0]['phone'] = $card->getBillingPhone();
     $data->customer_details[0]['cellPhone'] = null;
     $data->customer_details[0]['birthday'] = $card->getBirthday('Ymd');
 }
예제 #3
0
 /**
  * Returns the payment parameters for standard credit card payments
  *
  * @param CreditCard $card
  * @return array
  */
 protected function getContactParams(CreditCard $card)
 {
     return ['ADDRESS.CITY' => $card->getBillingCity(), 'ADDRESS.COUNTRY' => $card->getBillingCountry(), 'ADDRESS.ZIP' => $card->getBillingPostcode(), 'ADDRESS.STATE' => $card->getBillingState(), 'ADDRESS.STREET' => $card->getBillingAddress1(), 'CONTACT.EMAIL' => $card->getEmail(), 'CONTACT.IP' => $card->getIp(), 'CONTACT.MOBILE' => $card->getBillingFax(), 'CONTACT.PHONE' => $card->getBillingPhone(), 'NAME.BIRTHDATE' => $card->getBirthday(), 'NAME.COMPANY' => $card->getCompany(), 'NAME.FAMILY' => $card->getLastName(), 'NAME.GIVEN' => $card->getFirstName(), 'NAME.SALUTATION' => '', 'NAME.TITLE' => ''];
 }
예제 #4
0
 public function testEmail()
 {
     $this->card->setEmail('*****@*****.**');
     $this->assertEquals('*****@*****.**', $this->card->getEmail());
 }