当前位置: 首页>>代码示例>>PHP>>正文


PHP Subscription::factory方法代码示例

本文整理汇总了PHP中Subscription::factory方法的典型用法代码示例。如果您正苦于以下问题:PHP Subscription::factory方法的具体用法?PHP Subscription::factory怎么用?PHP Subscription::factory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Subscription的用法示例。


在下文中一共展示了Subscription::factory方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _initialize

 /**
  * sets instance properties from an array of values
  *
  * @access protected
  * @param array $venmoAccountAttribs array of Venmo account properties
  * @return void
  */
 protected function _initialize($venmoAccountAttribs)
 {
     $this->_attributes = $venmoAccountAttribs;
     $subscriptionArray = array();
     if (isset($venmoAccountAttribs['subscriptions'])) {
         foreach ($venmoAccountAttribs['subscriptions'] as $subscription) {
             $subscriptionArray[] = Subscription::factory($subscription);
         }
     }
     $this->_set('subscriptions', $subscriptionArray);
 }
开发者ID:atulparmar,项目名称:braintree_php,代码行数:18,代码来源:VenmoAccount.php

示例2: _initialize

 /**
  * sets instance properties from an array of values
  *
  * @access protected
  * @param array $amexExpressCheckoutCardAttribs array of Amex Express Checkout card properties
  * @return void
  */
 protected function _initialize($amexExpressCheckoutCardAttribs)
 {
     // set the attributes
     $this->_attributes = $amexExpressCheckoutCardAttribs;
     $subscriptionArray = [];
     if (isset($amexExpressCheckoutCardAttribs['subscriptions'])) {
         foreach ($amexExpressCheckoutCardAttribs['subscriptions'] as $subscription) {
             $subscriptionArray[] = Subscription::factory($subscription);
         }
     }
     $this->_set('subscriptions', $subscriptionArray);
 }
开发者ID:atulparmar,项目名称:braintree_php,代码行数:19,代码来源:AmexExpressCheckoutCard.php

示例3: _initialize

 /**
  * sets instance properties from an array of values
  *
  * @access protected
  * @param array $androidPayCardAttribs array of Android Pay card properties
  * @return none
  */
 protected function _initialize($androidPayCardAttribs)
 {
     // set the attributes
     $this->_attributes = $androidPayCardAttribs;
     $subscriptionArray = array();
     if (isset($androidPayCardAttribs['subscriptions'])) {
         foreach ($androidPayCardAttribs['subscriptions'] as $subscription) {
             $subscriptionArray[] = Subscription::factory($subscription);
         }
     }
     $this->_set('subscriptions', $subscriptionArray);
 }
开发者ID:njbhatt18,项目名称:PHP_Brain_tree,代码行数:19,代码来源:AndroidPayCard.php

示例4: _initialize

 /**
  * sets instance properties from an array of values
  *
  * @access protected
  * @param array $coinbaseAccountAttribs array of coinbaseAccount data
  * @return void
  */
 protected function _initialize($coinbaseAccountAttribs)
 {
     // set the attributes
     $this->_attributes = $coinbaseAccountAttribs;
     $subscriptionArray = [];
     if (isset($coinbaseAccountAttribs['subscriptions'])) {
         foreach ($coinbaseAccountAttribs['subscriptions'] as $subscription) {
             $subscriptionArray[] = Subscription::factory($subscription);
         }
     }
     $this->_set('subscriptions', $subscriptionArray);
 }
开发者ID:atulparmar,项目名称:braintree_php,代码行数:19,代码来源:CoinbaseAccount.php

示例5: _initialize

 /**
  * sets instance properties from an array of values
  *
  * @access protected
  * @param array $applePayCardAttribs array of Apple Pay card properties
  * @return none
  */
 protected function _initialize($applePayCardAttribs)
 {
     // set the attributes
     $this->_attributes = $applePayCardAttribs;
     $subscriptionArray = array();
     if (isset($applePayCardAttribs['subscriptions'])) {
         foreach ($applePayCardAttribs['subscriptions'] as $subscription) {
             $subscriptionArray[] = Subscription::factory($subscription);
         }
     }
     $this->_set('subscriptions', $subscriptionArray);
     $this->_set('expirationDate', $this->expirationMonth . '/' . $this->expirationYear);
 }
开发者ID:njbhatt18,项目名称:PHP_Brain_tree,代码行数:20,代码来源:ApplePayCard.php

示例6: _initialize

 protected function _initialize($attributes)
 {
     $this->_attributes = $attributes;
     if (isset($attributes['subject']['apiErrorResponse'])) {
         $wrapperNode = $attributes['subject']['apiErrorResponse'];
     } else {
         $wrapperNode = $attributes['subject'];
     }
     if (isset($wrapperNode['subscription'])) {
         $this->_set('subscription', Subscription::factory($attributes['subject']['subscription']));
     }
     if (isset($wrapperNode['merchantAccount'])) {
         $this->_set('merchantAccount', MerchantAccount::factory($wrapperNode['merchantAccount']));
     }
     if (isset($wrapperNode['transaction'])) {
         $this->_set('transaction', Transaction::factory($wrapperNode['transaction']));
     }
     if (isset($wrapperNode['disbursement'])) {
         $this->_set('disbursement', Disbursement::factory($wrapperNode['disbursement']));
     }
     if (isset($wrapperNode['partnerMerchant'])) {
         $this->_set('partnerMerchant', PartnerMerchant::factory($wrapperNode['partnerMerchant']));
     }
     if (isset($wrapperNode['dispute'])) {
         $this->_set('dispute', Dispute::factory($wrapperNode['dispute']));
     }
     if (isset($wrapperNode['accountUpdaterDailyReport'])) {
         $this->_set('accountUpdaterDailyReport', AccountUpdaterDailyReport::factory($wrapperNode['accountUpdaterDailyReport']));
     }
     if (isset($wrapperNode['errors'])) {
         $this->_set('errors', new Error\ValidationErrorCollection($wrapperNode['errors']));
         $this->_set('message', $wrapperNode['message']);
     }
 }
开发者ID:EfraimKrug,项目名称:Canneur,代码行数:34,代码来源:WebhookNotification.php

示例7: _initialize

 /**
  * sets instance properties from an array of values
  *
  * @access protected
  * @param array $creditCardAttribs array of creditcard data
  * @return none
  */
 protected function _initialize($creditCardAttribs)
 {
     // set the attributes
     $this->_attributes = $creditCardAttribs;
     // map each address into its own object
     $billingAddress = isset($creditCardAttribs['billingAddress']) ? Address::factory($creditCardAttribs['billingAddress']) : null;
     $subscriptionArray = array();
     if (isset($creditCardAttribs['subscriptions'])) {
         foreach ($creditCardAttribs['subscriptions'] as $subscription) {
             $subscriptionArray[] = Subscription::factory($subscription);
         }
     }
     $this->_set('subscriptions', $subscriptionArray);
     $this->_set('billingAddress', $billingAddress);
     $this->_set('expirationDate', $this->expirationMonth . '/' . $this->expirationYear);
     $this->_set('maskedNumber', $this->bin . '******' . $this->last4);
     if (isset($creditCardAttribs['verifications']) && count($creditCardAttribs['verifications']) > 0) {
         $verifications = $creditCardAttribs['verifications'];
         usort($verifications, array($this, '_compareCreatedAtOnVerifications'));
         $this->_set('verification', CreditCardVerification::factory($verifications[0]));
     }
 }
开发者ID:njbhatt18,项目名称:PHP_Brain_tree,代码行数:29,代码来源:CreditCard.php


注:本文中的Subscription::factory方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。