diff --git a/src/API2Client/Entities/Subscription.php b/src/API2Client/Entities/Subscription.php index 4f51bf2..9fbaff5 100644 --- a/src/API2Client/Entities/Subscription.php +++ b/src/API2Client/Entities/Subscription.php @@ -133,6 +133,11 @@ class Subscription */ private $affiliate_name; + /** + * @var array + */ + protected $paymentOptions; + /** * @return string */ @@ -578,6 +583,22 @@ public function setCustomerLocalTime($customer_local_time) return $this; } + /** + * @return array + */ + public function getPaymentOptions() + { + return $this->paymentOptions; + } + + /** + * @param array $paymentOptions + */ + public function setPaymentOptions($paymentOptions) + { + $this->paymentOptions = $paymentOptions; + } + /** * @return array @@ -607,6 +628,7 @@ public function toArray () 'customer_ip_address' => $this->getCustomerIpAddress(), 'customer_local_time' => $this->getCustomerLocalTime(), 'affiliate_name' => $this->getAffiliateName(), + 'payment_options' => $this->getPaymentOptions(), ); } } \ No newline at end of file diff --git a/src/API2Client/Entities/SubscriptionResult.php b/src/API2Client/Entities/SubscriptionResult.php index 0454fd1..e734827 100644 --- a/src/API2Client/Entities/SubscriptionResult.php +++ b/src/API2Client/Entities/SubscriptionResult.php @@ -24,6 +24,10 @@ class SubscriptionResult */ private $messages = array(); + private $payment_reference; + + private $client_secret; + /** * @return mixed */ @@ -89,4 +93,39 @@ public function setStatus($status) $this->status = $status; return $this; } + + /** + * @return mixed + */ + public function getPaymentReference() + { + return $this->payment_reference; + } + + /** + * @param mixed $payment_reference + */ + public function setPaymentReference($payment_reference) + { + $this->payment_reference = $payment_reference; + return $this; + } + + /** + * @return mixed + */ + public function getClientSecret() + { + return $this->client_secret; + } + + /** + * @param mixed $client_secret + */ + public function setClientSecret($client_secret) + { + $this->client_secret = $client_secret; + return $this; + } + } \ No newline at end of file diff --git a/src/API2Client/Setters/SubscriptionResult.php b/src/API2Client/Setters/SubscriptionResult.php index 4034e2a..155c3b9 100644 --- a/src/API2Client/Setters/SubscriptionResult.php +++ b/src/API2Client/Setters/SubscriptionResult.php @@ -18,6 +18,8 @@ public function create ($data) $created = new SubscriptionResult (); $created->setRedirectUrl ($this->getValue ('redirect_url', $data, '')); + $created->setPaymentReference ($this->getValue ('payment_reference', $data, '')); + $created->setClientSecret ($this->getValue ('client_secret', $data, '')); $created->setStatus ($this->getValue ('status', $data, false)); $dataSubscription = $this->getValue ('subscription', $data, array ());