File indexing completed on 2024-12-22 05:36:23
0001 <?php 0002 /** 0003 * ocs-webserver 0004 * 0005 * Copyright 2016 by pling GmbH. 0006 * 0007 * This file is part of ocs-webserver. 0008 * 0009 * This program is free software: you can redistribute it and/or modify 0010 * it under the terms of the GNU Affero General Public License as 0011 * published by the Free Software Foundation, either version 3 of the 0012 * License, or (at your option) any later version. 0013 * 0014 * This program is distributed in the hope that it will be useful, 0015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0017 * GNU Affero General Public License for more details. 0018 * 0019 * You should have received a copy of the GNU Affero General Public License 0020 * along with this program. If not, see <http://www.gnu.org/licenses/>. 0021 **/ 0022 0023 class Local_Payment_Amazon_UserData implements Local_Payment_UserDataInterface 0024 { 0025 0026 protected $_email; 0027 protected $_firstName; 0028 protected $_lastName; 0029 protected $_payment_user_id; 0030 protected $_productTitle; 0031 protected $_productId; 0032 0033 public function getEmail() 0034 { 0035 return $this->_email; 0036 } 0037 0038 public function getFirstName() 0039 { 0040 return $this->_firstName; 0041 } 0042 0043 public function setFirstName($firstName) 0044 { 0045 $this->_firstName = $firstName; 0046 } 0047 0048 public function getLastName() 0049 { 0050 return $this->_lastName; 0051 } 0052 0053 public function setLastName($lastName) 0054 { 0055 $this->_lastName = $lastName; 0056 } 0057 0058 public function getPaymentUserId() 0059 { 0060 return $this->_payment_user_id; 0061 } 0062 0063 public function getProductTitle() 0064 { 0065 return $this->_productTitle; 0066 } 0067 0068 public function getProductId() 0069 { 0070 return $this->_productId; 0071 } 0072 0073 /** 0074 * @param $array 0075 */ 0076 public function generateFromArray($array) 0077 { 0078 0079 $this->_email = $array['mail']; 0080 if (array_key_exists('firstname', $array)) { 0081 $this->_firstName = $array['firstname']; 0082 } 0083 if (array_key_exists('lastname', $array)) { 0084 $this->_lastName = $array['lastname']; 0085 } 0086 if (array_key_exists('paypal_mail', $array)) { 0087 $this->_payment_user_id = $array['paypal_mail']; 0088 } 0089 if (array_key_exists('project_id', $array)) { 0090 $this->_productId = $array['project_id']; 0091 } 0092 if (array_key_exists('title', $array)) { 0093 $this->_productTitle = $array['title']; 0094 } 0095 0096 } 0097 0098 }