forked from LiveCarta/PayPal-PHP-SDK
Updated Payment APIs
- Updated SDK Models to latest Payment APIs - Updated Unit Tests
This commit is contained in:
@@ -16,11 +16,12 @@ use PayPal\Common\PayPalModel;
|
||||
* @property string type
|
||||
* @property int expire_month
|
||||
* @property int expire_year
|
||||
* @property int start_month
|
||||
* @property int start_year
|
||||
* @property int cvv2
|
||||
* @property string start_month
|
||||
* @property string start_year
|
||||
* @property string cvv2
|
||||
* @property string first_name
|
||||
* @property string last_name
|
||||
* @property string billing_country
|
||||
* @property \PayPal\Api\Address billing_address
|
||||
* @property string external_customer_id
|
||||
* @property string status
|
||||
@@ -123,7 +124,7 @@ class PaymentCard extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* 4 digit card expiry year.
|
||||
* 4 digit card expiry year
|
||||
*
|
||||
* @param int $expire_year
|
||||
*
|
||||
@@ -136,7 +137,7 @@ class PaymentCard extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* 4 digit card expiry year.
|
||||
* 4 digit card expiry year
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
@@ -148,7 +149,7 @@ class PaymentCard extends PayPalModel
|
||||
/**
|
||||
* 2 digit card start month.
|
||||
*
|
||||
* @param int $start_month
|
||||
* @param string $start_month
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@@ -161,7 +162,7 @@ class PaymentCard extends PayPalModel
|
||||
/**
|
||||
* 2 digit card start month.
|
||||
*
|
||||
* @return int
|
||||
* @return string
|
||||
*/
|
||||
public function getStartMonth()
|
||||
{
|
||||
@@ -171,7 +172,7 @@ class PaymentCard extends PayPalModel
|
||||
/**
|
||||
* 4 digit card start year.
|
||||
*
|
||||
* @param int $start_year
|
||||
* @param string $start_year
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@@ -184,7 +185,7 @@ class PaymentCard extends PayPalModel
|
||||
/**
|
||||
* 4 digit card start year.
|
||||
*
|
||||
* @return int
|
||||
* @return string
|
||||
*/
|
||||
public function getStartYear()
|
||||
{
|
||||
@@ -192,9 +193,9 @@ class PaymentCard extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Card validation code. Only supported when making a Payment, but not when saving a payment card for future use.
|
||||
* Card validation code. Only supported when making a Payment but not when saving a payment card for future use.
|
||||
*
|
||||
* @param int $cvv2
|
||||
* @param string $cvv2
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
@@ -205,9 +206,9 @@ class PaymentCard extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Card validation code. Only supported when making a Payment, but not when saving a payment card for future use.
|
||||
* Card validation code. Only supported when making a Payment but not when saving a payment card for future use.
|
||||
*
|
||||
* @return int
|
||||
* @return string
|
||||
*/
|
||||
public function getCvv2()
|
||||
{
|
||||
@@ -260,6 +261,29 @@ class PaymentCard extends PayPalModel
|
||||
return $this->last_name;
|
||||
}
|
||||
|
||||
/**
|
||||
* 2 letter country code
|
||||
*
|
||||
* @param string $billing_country
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setBillingCountry($billing_country)
|
||||
{
|
||||
$this->billing_country = $billing_country;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 2 letter country code
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getBillingCountry()
|
||||
{
|
||||
return $this->billing_country;
|
||||
}
|
||||
|
||||
/**
|
||||
* Billing Address associated with this card.
|
||||
*
|
||||
@@ -284,7 +308,7 @@ class PaymentCard extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* A unique identifier of the customer to whom this card account belongs. Generated and provided by the facilitator. This is required when creating or using a stored funding instrument in vault.
|
||||
* A unique identifier of the customer to whom this card account belongs to. Generated and provided by the facilitator. This is required when creating or using a stored funding instrument in vault.
|
||||
*
|
||||
* @param string $external_customer_id
|
||||
*
|
||||
@@ -297,7 +321,7 @@ class PaymentCard extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* A unique identifier of the customer to whom this card account belongs. Generated and provided by the facilitator. This is required when creating or using a stored funding instrument in vault.
|
||||
* A unique identifier of the customer to whom this card account belongs to. Generated and provided by the facilitator. This is required when creating or using a stored funding instrument in vault.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@@ -331,7 +355,7 @@ class PaymentCard extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Date/Time until this resource can be used to fund a payment.
|
||||
* Date/Time until this resource can be used fund a payment.
|
||||
*
|
||||
* @param string $valid_until
|
||||
*
|
||||
@@ -344,7 +368,7 @@ class PaymentCard extends PayPalModel
|
||||
}
|
||||
|
||||
/**
|
||||
* Date/Time until this resource can be used to fund a payment.
|
||||
* Date/Time until this resource can be used fund a payment.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user