Overview
  • Namespace
  • Class

Namespaces

  • PayPal
    • Api
    • Auth
    • Cache
    • Common
    • Converter
    • Core
    • Exception
    • Handler
    • Log
    • Rest
    • Security
    • Transport
    • Validation

Classes

  • PayPal\Api\Address
  • PayPal\Api\Agreement
  • PayPal\Api\AgreementDetails
  • PayPal\Api\AgreementStateDescriptor
  • PayPal\Api\AgreementTransaction
  • PayPal\Api\AgreementTransactions
  • PayPal\Api\AlternatePayment
  • PayPal\Api\Amount
  • PayPal\Api\Authorization
  • PayPal\Api\BankAccount
  • PayPal\Api\BankAccountsList
  • PayPal\Api\BankToken
  • PayPal\Api\BaseAddress
  • PayPal\Api\Billing
  • PayPal\Api\BillingAgreementToken
  • PayPal\Api\BillingInfo
  • PayPal\Api\CancelNotification
  • PayPal\Api\Capture
  • PayPal\Api\CarrierAccount
  • PayPal\Api\CarrierAccountToken
  • PayPal\Api\CartBase
  • PayPal\Api\ChargeModel
  • PayPal\Api\Cost
  • PayPal\Api\CountryCode
  • PayPal\Api\CreateProfileResponse
  • PayPal\Api\Credit
  • PayPal\Api\CreditCard
  • PayPal\Api\CreditCardHistory
  • PayPal\Api\CreditCardList
  • PayPal\Api\CreditCardToken
  • PayPal\Api\CreditFinancingOffered
  • PayPal\Api\Currency
  • PayPal\Api\CurrencyConversion
  • PayPal\Api\CustomAmount
  • PayPal\Api\DetailedRefund
  • PayPal\Api\Details
  • PayPal\Api\Error
  • PayPal\Api\ErrorDetails
  • PayPal\Api\ExtendedBankAccount
  • PayPal\Api\ExternalFunding
  • PayPal\Api\FileAttachment
  • PayPal\Api\FlowConfig
  • PayPal\Api\FmfDetails
  • PayPal\Api\FundingDetail
  • PayPal\Api\FundingInstrument
  • PayPal\Api\FundingOption
  • PayPal\Api\FundingSource
  • PayPal\Api\FuturePayment
  • PayPal\Api\HyperSchema
  • PayPal\Api\Image
  • PayPal\Api\Incentive
  • PayPal\Api\InputFields
  • PayPal\Api\InstallmentInfo
  • PayPal\Api\InstallmentOption
  • PayPal\Api\Invoice
  • PayPal\Api\InvoiceAddress
  • PayPal\Api\InvoiceItem
  • PayPal\Api\InvoiceNumber
  • PayPal\Api\InvoiceSearchResponse
  • PayPal\Api\Item
  • PayPal\Api\ItemList
  • PayPal\Api\Links
  • PayPal\Api\Measurement
  • PayPal\Api\MerchantInfo
  • PayPal\Api\MerchantPreferences
  • PayPal\Api\Metadata
  • PayPal\Api\NameValuePair
  • PayPal\Api\Notification
  • PayPal\Api\OpenIdAddress
  • PayPal\Api\OpenIdError
  • PayPal\Api\OpenIdSession
  • PayPal\Api\OpenIdTokeninfo
  • PayPal\Api\OpenIdUserinfo
  • PayPal\Api\Order
  • PayPal\Api\OverrideChargeModel
  • PayPal\Api\Participant
  • PayPal\Api\Patch
  • PayPal\Api\PatchRequest
  • PayPal\Api\Payee
  • PayPal\Api\Payer
  • PayPal\Api\PayerInfo
  • PayPal\Api\Payment
  • PayPal\Api\PaymentCard
  • PayPal\Api\PaymentCardToken
  • PayPal\Api\PaymentDefinition
  • PayPal\Api\PaymentDetail
  • PayPal\Api\PaymentExecution
  • PayPal\Api\PaymentHistory
  • PayPal\Api\PaymentInstruction
  • PayPal\Api\PaymentOptions
  • PayPal\Api\PaymentSummary
  • PayPal\Api\PaymentTerm
  • PayPal\Api\Payout
  • PayPal\Api\PayoutBatch
  • PayPal\Api\PayoutBatchHeader
  • PayPal\Api\PayoutItem
  • PayPal\Api\PayoutItemDetails
  • PayPal\Api\PayoutSenderBatchHeader
  • PayPal\Api\Phone
  • PayPal\Api\Plan
  • PayPal\Api\PlanList
  • PayPal\Api\PotentialPayerInfo
  • PayPal\Api\Presentation
  • PayPal\Api\PrivateLabelCard
  • PayPal\Api\ProcessorResponse
  • PayPal\Api\RecipientBankingInstruction
  • PayPal\Api\RedirectUrls
  • PayPal\Api\Refund
  • PayPal\Api\RefundDetail
  • PayPal\Api\RefundRequest
  • PayPal\Api\RelatedResources
  • PayPal\Api\Sale
  • PayPal\Api\Search
  • PayPal\Api\ShippingAddress
  • PayPal\Api\ShippingCost
  • PayPal\Api\ShippingInfo
  • PayPal\Api\Tax
  • PayPal\Api\Template
  • PayPal\Api\TemplateData
  • PayPal\Api\Templates
  • PayPal\Api\TemplateSettings
  • PayPal\Api\TemplateSettingsMetadata
  • PayPal\Api\Terms
  • PayPal\Api\Transaction
  • PayPal\Api\TransactionBase
  • PayPal\Api\Transactions
  • PayPal\Api\VerifyWebhookSignature
  • PayPal\Api\VerifyWebhookSignatureResponse
  • PayPal\Api\Webhook
  • PayPal\Api\WebhookEvent
  • PayPal\Api\WebhookEventList
  • PayPal\Api\WebhookEventType
  • PayPal\Api\WebhookEventTypeList
  • PayPal\Api\WebhookList
  • PayPal\Api\WebProfile
  • PayPal\Auth\OAuthTokenCredential
  • PayPal\Cache\AuthorizationCache
  • PayPal\Common\ArrayUtil
  • PayPal\Common\PayPalModel
  • PayPal\Common\PayPalResourceModel
  • PayPal\Common\PayPalUserAgent
  • PayPal\Common\ReflectionUtil
  • PayPal\Converter\FormatConverter
  • PayPal\Core\PayPalConfigManager
  • PayPal\Core\PayPalConstants
  • PayPal\Core\PayPalCredentialManager
  • PayPal\Core\PayPalHttpConfig
  • PayPal\Core\PayPalHttpConnection
  • PayPal\Core\PayPalLoggingManager
  • PayPal\Handler\OauthHandler
  • PayPal\Handler\RestHandler
  • PayPal\Log\PayPalDefaultLogFactory
  • PayPal\Log\PayPalLogger
  • PayPal\Rest\ApiContext
  • PayPal\Security\Cipher
  • PayPal\Transport\PayPalRestCall
  • PayPal\Validation\ArgumentValidator
  • PayPal\Validation\JsonValidator
  • PayPal\Validation\NumericValidator
  • PayPal\Validation\UrlValidator

Interfaces

  • PayPal\Handler\IPayPalHandler
  • PayPal\Log\PayPalLogFactory
  • PayPal\Rest\IResource

Exceptions

  • PayPal\Exception\PayPalConfigurationException
  • PayPal\Exception\PayPalConnectionException
  • PayPal\Exception\PayPalInvalidCredentialException
  • PayPal\Exception\PayPalMissingCredentialException
  1 <?php
  2 
  3 namespace PayPal\Api;
  4 
  5 use PayPal\Common\PayPalModel;
  6 
  7 /**
  8  * Class PaymentCard
  9  *
 10  * A payment card that can fund a payment.
 11  *
 12  * @package PayPal\Api
 13  *
 14  * @property string id
 15  * @property string number
 16  * @property string type
 17  * @property string expire_month
 18  * @property string expire_year
 19  * @property string start_month
 20  * @property string start_year
 21  * @property string cvv2
 22  * @property string first_name
 23  * @property string last_name
 24  * @property string billing_country
 25  * @property \PayPal\Api\Address billing_address
 26  * @property string external_customer_id
 27  * @property string status
 28  * @property string card_product_class
 29  * @property string valid_until
 30  * @property string issue_number
 31  * @property \PayPal\Api\Links[] links
 32  */
 33 class PaymentCard extends PayPalModel
 34 {
 35     /**
 36      * The ID of a credit card to save for later use.
 37      *
 38      * @param string $id
 39      * 
 40      * @return $this
 41      */
 42     public function setId($id)
 43     {
 44         $this->id = $id;
 45         return $this;
 46     }
 47 
 48     /**
 49      * The ID of a credit card to save for later use.
 50      *
 51      * @return string
 52      */
 53     public function getId()
 54     {
 55         return $this->id;
 56     }
 57 
 58     /**
 59      * The card number.
 60      *
 61      * @param string $number
 62      * 
 63      * @return $this
 64      */
 65     public function setNumber($number)
 66     {
 67         $this->number = $number;
 68         return $this;
 69     }
 70 
 71     /**
 72      * The card number.
 73      *
 74      * @return string
 75      */
 76     public function getNumber()
 77     {
 78         return $this->number;
 79     }
 80 
 81     /**
 82      * The card type.
 83      * Valid Values: ["VISA", "AMEX", "SOLO", "JCB", "STAR", "DELTA", "DISCOVER", "SWITCH", "MAESTRO", "CB_NATIONALE", "CONFINOGA", "COFIDIS", "ELECTRON", "CETELEM", "CHINA_UNION_PAY", "MASTERCARD"]
 84      *
 85      * @param string $type
 86      * 
 87      * @return $this
 88      */
 89     public function setType($type)
 90     {
 91         $this->type = $type;
 92         return $this;
 93     }
 94 
 95     /**
 96      * The card type.
 97      *
 98      * @return string
 99      */
100     public function getType()
101     {
102         return $this->type;
103     }
104 
105     /**
106      * The two-digit expiry month for the card.
107      *
108      * @param string $expire_month
109      * 
110      * @return $this
111      */
112     public function setExpireMonth($expire_month)
113     {
114         $this->expire_month = $expire_month;
115         return $this;
116     }
117 
118     /**
119      * The two-digit expiry month for the card.
120      *
121      * @return string
122      */
123     public function getExpireMonth()
124     {
125         return $this->expire_month;
126     }
127 
128     /**
129      * The four-digit expiry year for the card.
130      *
131      * @param string $expire_year
132      * 
133      * @return $this
134      */
135     public function setExpireYear($expire_year)
136     {
137         $this->expire_year = $expire_year;
138         return $this;
139     }
140 
141     /**
142      * The four-digit expiry year for the card.
143      *
144      * @return string
145      */
146     public function getExpireYear()
147     {
148         return $this->expire_year;
149     }
150 
151     /**
152      * The two-digit start month for the card. Required for UK Maestro cards.
153      *
154      * @param string $start_month
155      * 
156      * @return $this
157      */
158     public function setStartMonth($start_month)
159     {
160         $this->start_month = $start_month;
161         return $this;
162     }
163 
164     /**
165      * The two-digit start month for the card. Required for UK Maestro cards.
166      *
167      * @return string
168      */
169     public function getStartMonth()
170     {
171         return $this->start_month;
172     }
173 
174     /**
175      * The four-digit start year for the card. Required for UK Maestro cards. 
176      *
177      * @param string $start_year
178      * 
179      * @return $this
180      */
181     public function setStartYear($start_year)
182     {
183         $this->start_year = $start_year;
184         return $this;
185     }
186 
187     /**
188      * The four-digit start year for the card. Required for UK Maestro cards. 
189      *
190      * @return string
191      */
192     public function getStartYear()
193     {
194         return $this->start_year;
195     }
196 
197     /**
198      * The validation code for the card. Supported for payments but not for saving payment cards for future use.
199      *
200      * @param string $cvv2
201      * 
202      * @return $this
203      */
204     public function setCvv2($cvv2)
205     {
206         $this->cvv2 = $cvv2;
207         return $this;
208     }
209 
210     /**
211      * The validation code for the card. Supported for payments but not for saving payment cards for future use.
212      *
213      * @return string
214      */
215     public function getCvv2()
216     {
217         return $this->cvv2;
218     }
219 
220     /**
221      * The first name of the card holder.
222      *
223      * @param string $first_name
224      * 
225      * @return $this
226      */
227     public function setFirstName($first_name)
228     {
229         $this->first_name = $first_name;
230         return $this;
231     }
232 
233     /**
234      * The first name of the card holder.
235      *
236      * @return string
237      */
238     public function getFirstName()
239     {
240         return $this->first_name;
241     }
242 
243     /**
244      * The last name of the card holder.
245      *
246      * @param string $last_name
247      * 
248      * @return $this
249      */
250     public function setLastName($last_name)
251     {
252         $this->last_name = $last_name;
253         return $this;
254     }
255 
256     /**
257      * The last name of the card holder.
258      *
259      * @return string
260      */
261     public function getLastName()
262     {
263         return $this->last_name;
264     }
265 
266     /**
267      * The two-letter country code.
268      *
269      * @param string $billing_country
270      * 
271      * @return $this
272      */
273     public function setBillingCountry($billing_country)
274     {
275         $this->billing_country = $billing_country;
276         return $this;
277     }
278 
279     /**
280      * The two-letter country code.
281      *
282      * @return string
283      */
284     public function getBillingCountry()
285     {
286         return $this->billing_country;
287     }
288 
289     /**
290      * The billing address for the card.
291      *
292      * @param \PayPal\Api\Address $billing_address
293      * 
294      * @return $this
295      */
296     public function setBillingAddress($billing_address)
297     {
298         $this->billing_address = $billing_address;
299         return $this;
300     }
301 
302     /**
303      * The billing address for the card.
304      *
305      * @return \PayPal\Api\Address
306      */
307     public function getBillingAddress()
308     {
309         return $this->billing_address;
310     }
311 
312     /**
313      * The ID of the customer who owns this card account. The facilitator generates and provides this ID. Required when you create or use a stored funding instrument in the PayPal vault.
314      *
315      * @param string $external_customer_id
316      * 
317      * @return $this
318      */
319     public function setExternalCustomerId($external_customer_id)
320     {
321         $this->external_customer_id = $external_customer_id;
322         return $this;
323     }
324 
325     /**
326      * The ID of the customer who owns this card account. The facilitator generates and provides this ID. Required when you create or use a stored funding instrument in the PayPal vault.
327      *
328      * @return string
329      */
330     public function getExternalCustomerId()
331     {
332         return $this->external_customer_id;
333     }
334 
335     /**
336      * The state of the funding instrument.
337      * Valid Values: ["EXPIRED", "ACTIVE"]
338      *
339      * @param string $status
340      * 
341      * @return $this
342      */
343     public function setStatus($status)
344     {
345         $this->status = $status;
346         return $this;
347     }
348 
349     /**
350      * The state of the funding instrument.
351      *
352      * @return string
353      */
354     public function getStatus()
355     {
356         return $this->status;
357     }
358 
359     /**
360      * The product class of the financial instrument issuer.
361      * Valid Values: ["CREDIT", "DEBIT", "GIFT", "PAYPAL_PREPAID", "PREPAID", "UNKNOWN"]
362      *
363      * @param string $card_product_class
364      * 
365      * @return $this
366      */
367     public function setCardProductClass($card_product_class)
368     {
369         $this->card_product_class = $card_product_class;
370         return $this;
371     }
372 
373     /**
374      * The product class of the financial instrument issuer.
375      *
376      * @return string
377      */
378     public function getCardProductClass()
379     {
380         return $this->card_product_class;
381     }
382 
383     /**
384      * The date and time until when this instrument can be used fund a payment.
385      *
386      * @param string $valid_until
387      * 
388      * @return $this
389      */
390     public function setValidUntil($valid_until)
391     {
392         $this->valid_until = $valid_until;
393         return $this;
394     }
395 
396     /**
397      * The date and time until when this instrument can be used fund a payment.
398      *
399      * @return string
400      */
401     public function getValidUntil()
402     {
403         return $this->valid_until;
404     }
405 
406     /**
407      * The one- to two-digit card issue number. Required for UK Maestro cards.
408      *
409      * @param string $issue_number
410      * 
411      * @return $this
412      */
413     public function setIssueNumber($issue_number)
414     {
415         $this->issue_number = $issue_number;
416         return $this;
417     }
418 
419     /**
420      * The one- to two-digit card issue number. Required for UK Maestro cards.
421      *
422      * @return string
423      */
424     public function getIssueNumber()
425     {
426         return $this->issue_number;
427     }
428 
429     /**
430      * Sets Links
431      *
432      * @param \PayPal\Api\Links[] $links
433      * 
434      * @return $this
435      */
436     public function setLinks($links)
437     {
438         $this->links = $links;
439         return $this;
440     }
441 
442     /**
443      * Gets Links
444      *
445      * @return \PayPal\Api\Links[]
446      */
447     public function getLinks()
448     {
449         return $this->links;
450     }
451 
452     /**
453      * Append Links to the list.
454      *
455      * @param \PayPal\Api\Links $links
456      * @return $this
457      */
458     public function addLink($links)
459     {
460         if (!$this->getLinks()) {
461             return $this->setLinks(array($links));
462         } else {
463             return $this->setLinks(
464                 array_merge($this->getLinks(), array($links))
465             );
466         }
467     }
468 
469     /**
470      * Remove Links from the list.
471      *
472      * @param \PayPal\Api\Links $links
473      * @return $this
474      */
475     public function removeLink($links)
476     {
477         return $this->setLinks(
478             array_diff($this->getLinks(), array($links))
479         );
480     }
481 
482 }
483 
API documentation generated by ApiGen