Overview

Classes

  • Syspay_Merchant_AstroPayBanksRequest
  • Syspay_Merchant_BillingAgreementCancellationRequest
  • Syspay_Merchant_BillingAgreementInfoRequest
  • Syspay_Merchant_BillingAgreementListRequest
  • Syspay_Merchant_BillingAgreementRequest
  • Syspay_Merchant_ChargebackInfoRequest
  • Syspay_Merchant_ChargebackListRequest
  • Syspay_Merchant_Client
  • Syspay_Merchant_ConfirmRequest
  • Syspay_Merchant_EMS
  • Syspay_Merchant_Entity
  • Syspay_Merchant_Entity_AstroPayBank
  • Syspay_Merchant_Entity_BillingAgreement
  • Syspay_Merchant_Entity_Chargeback
  • Syspay_Merchant_Entity_Creditcard
  • Syspay_Merchant_Entity_Customer
  • Syspay_Merchant_Entity_Eterminal
  • Syspay_Merchant_Entity_Payment
  • Syspay_Merchant_Entity_PaymentMethod
  • Syspay_Merchant_Entity_PaymentRecipient
  • Syspay_Merchant_Entity_Plan
  • Syspay_Merchant_Entity_Refund
  • Syspay_Merchant_Entity_Subscription
  • Syspay_Merchant_Entity_SubscriptionEvent
  • Syspay_Merchant_EterminalRequest
  • Syspay_Merchant_IpAddressesRequest
  • Syspay_Merchant_PaymentInfoRequest
  • Syspay_Merchant_PaymentListRequest
  • Syspay_Merchant_PaymentRequest
  • Syspay_Merchant_PlanInfoRequest
  • Syspay_Merchant_PlanRequest
  • Syspay_Merchant_PlanUpdateRequest
  • Syspay_Merchant_RebillRequest
  • Syspay_Merchant_Redirect
  • Syspay_Merchant_RefundInfoRequest
  • Syspay_Merchant_RefundListRequest
  • Syspay_Merchant_RefundRequest
  • Syspay_Merchant_Request
  • Syspay_Merchant_SubscriptionCancellationRequest
  • Syspay_Merchant_SubscriptionInfoRequest
  • Syspay_Merchant_SubscriptionRebillRequest
  • Syspay_Merchant_SubscriptionRequest
  • Syspay_Merchant_Utils
  • Syspay_Merchant_VoidRequest

Interfaces

  • Syspay_Merchant_Entity_ReturnedEntityInterface

Exceptions

  • Syspay_Merchant_EMSException
  • Syspay_Merchant_RedirectException
  • Syspay_Merchant_RequestException
  • Syspay_Merchant_UnexpectedResponseException
  • Overview
  • Class
  • Tree
  1: <?php
  2: 
  3: /**
  4:  * A creditcard object
  5:  */
  6: class Syspay_Merchant_Entity_Creditcard extends Syspay_Merchant_Entity
  7: {
  8:     const TYPE = 'creditcard';
  9: 
 10:     /**
 11:      * @var string
 12:      */
 13:     protected $number;
 14: 
 15:     /**
 16:      * @var string
 17:      */
 18:     protected $cardholder;
 19: 
 20:     /**
 21:      * @var integer
 22:      */
 23:     protected $cvc;
 24: 
 25:     /**
 26:      * @var integer
 27:      */
 28:     protected $exp_month;
 29: 
 30:     /**
 31:      * @var integer
 32:      */
 33:     protected $exp_year;
 34: 
 35:     /**
 36:      * @var string
 37:      */
 38:     protected $token;
 39: 
 40:     /**
 41:      * {@inheritDoc}
 42:      *
 43:      * If a token is set, use it, otherwise use the full card data
 44:      */
 45:     public function toArray()
 46:     {
 47:         $data = array();
 48:         if (true === empty($this->token)) {
 49:             $data['number']     = $this->number;
 50:             $data['cardholder'] = $this->cardholder;
 51:             $data['cvc']        = $this->cvc;
 52:             $data['exp_month']  = $this->exp_month;
 53:             $data['exp_year']   = $this->exp_year;
 54:         } else {
 55:             $data['token']      = $this->token;
 56:         }
 57: 
 58:         return $data;
 59:     }
 60: 
 61:     /**
 62:      * Gets the value of token.
 63:      *
 64:      * @return string
 65:      */
 66:     public function getToken()
 67:     {
 68:         return $this->token;
 69:     }
 70: 
 71:     /**
 72:      * Sets the value of token.
 73:      *
 74:      * @param string $token the token
 75:      *
 76:      * @return self
 77:      */
 78:     public function setToken($token)
 79:     {
 80:         $this->token = $token;
 81: 
 82:         return $this;
 83:     }
 84: 
 85:     /**
 86:      * Gets the value of number.
 87:      *
 88:      * @return string
 89:      */
 90:     public function getNumber()
 91:     {
 92:         return $this->number;
 93:     }
 94: 
 95:     /**
 96:      * Sets the value of number.
 97:      *
 98:      * @param string $number the number
 99:      *
100:      * @return self
101:      */
102:     public function setNumber($number)
103:     {
104:         $this->number = $number;
105: 
106:         return $this;
107:     }
108: 
109:     /**
110:      * Gets the value of cardholder.
111:      *
112:      * @return string
113:      */
114:     public function getHolder()
115:     {
116:         return $this->cardholder;
117:     }
118: 
119:     /**
120:      * Sets the value of cardholder.
121:      *
122:      * @param string $holder the cardholder
123:      *
124:      * @return self
125:      */
126:     public function setHolder($holder)
127:     {
128:         $this->cardholder = $holder;
129: 
130:         return $this;
131:     }
132: 
133:     /**
134:      * Gets the value of cvc.
135:      *
136:      * @return integer
137:      */
138:     public function getCvc()
139:     {
140:         return $this->cvc;
141:     }
142: 
143:     /**
144:      * Sets the value of cvc.
145:      *
146:      * @param integer $cvc the cvc
147:      *
148:      * @return self
149:      */
150:     public function setCvc($cvc)
151:     {
152:         $this->cvc = $cvc;
153: 
154:         return $this;
155:     }
156: 
157:     /**
158:      * Gets the value of exp_month.
159:      *
160:      * @return integer
161:      */
162:     public function getExpMonth()
163:     {
164:         return $this->exp_month;
165:     }
166: 
167:     /**
168:      * Sets the value of exp_month.
169:      *
170:      * @param integer $expMonth the exp_month
171:      *
172:      * @return self
173:      */
174:     public function setExpMonth($expMonth)
175:     {
176:         $this->exp_month = $expMonth;
177: 
178:         return $this;
179:     }
180: 
181:     /**
182:      * Gets the value of exp_year.
183:      *
184:      * @return integer
185:      */
186:     public function getExpYear()
187:     {
188:         return $this->exp_year;
189:     }
190: 
191:     /**
192:      * Sets the value of exp_year.
193:      *
194:      * @param integer $expYear the exp_year
195:      *
196:      * @return self
197:      */
198:     public function setExpYear($expYear)
199:     {
200:         $this->exp_year = $expYear;
201: 
202:         return $this;
203:     }
204: }
205: 
Syspay Merchant SDK API documentation generated by ApiGen 2.8.0