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


PHP Braintree_TransparentRedirect::createCreditCardData方法代码示例

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


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

示例1: buildTrData

 function buildTrData($redirectUrl)
 {
     $customer = Mage::getSingleton('customer/session')->getCustomer();
     if ($this->braintree->exists($customer->getId())) {
         return Braintree_TransparentRedirect::createCreditCardData(array('redirectUrl' => $redirectUrl, 'creditCard' => array('customerId' => $customer->getId())));
     } else {
         $credit_card_billing = array();
         $billing = $customer->getDefaultBilling();
         if ($billing) {
             $address = Mage::getModel('customer/address')->load($billing);
             $credit_card_billing['billingAddress'] = $this->braintree->toBraintreeAddress($address);
         }
         return Braintree_TransparentRedirect::createCustomerData(array('redirectUrl' => $redirectUrl, 'customer' => array('id' => $customer->getId(), 'firstName' => $customer->getFirstname(), 'lastName' => $customer->getLastname(), 'company' => $customer->getCompany(), 'phone' => $customer->getTelephone(), 'fax' => $customer->getFax(), 'email' => $customer->getEmail(), 'creditCard' => $credit_card_billing)));
     }
 }
开发者ID:technomagegithub,项目名称:inmed-magento,代码行数:15,代码来源:Management.php

示例2: createCreditCardViaTr

 function createCreditCardViaTr($regularParams, $trParams)
 {
     $trData = Braintree_TransparentRedirect::createCreditCardData(array_merge($trParams, array("redirectUrl" => "http://www.example.com")));
     return Braintree_TestHelper::submitTrRequest(Braintree_CreditCard::createCreditCardUrl(), $regularParams, $trData);
 }
开发者ID:buga1234,项目名称:buga_segforours,代码行数:5,代码来源:CreditCardTest.php

示例3: testCreateCreditCardFromTransparentRedirect

 function testCreateCreditCardFromTransparentRedirect()
 {
     $customer = Braintree_Customer::create(array('firstName' => 'Mike', 'lastName' => 'Jonez'))->customer;
     $params = array('credit_card' => array('number' => Braintree_Test_CreditCardNumbers::$visa));
     $trParams = array('creditCard' => array('customerId' => $customer->id, 'expirationMonth' => '01', 'expirationYear' => '10'));
     $trData = Braintree_TransparentRedirect::createCreditCardData(array_merge($trParams, array("redirectUrl" => "http://www.example.com")));
     $queryString = Braintree_TestHelper::submitTrRequest(Braintree_TransparentRedirect::url(), $params, $trData);
     $result = Braintree_TransparentRedirect::confirm($queryString);
     $this->assertTrue($result->success);
     $creditCard = $result->creditCard;
     $this->assertequals('401288', $creditCard->bin);
     $this->assertequals('1881', $creditCard->last4);
     $this->assertequals('01/2010', $creditCard->expirationDate);
 }
开发者ID:buga1234,项目名称:buga_segforours,代码行数:14,代码来源:TransparentRedirectTest.php

示例4: createCreditCardData

 public function createCreditCardData($params)
 {
     return Braintree_TransparentRedirect::createCreditCardData($params);
 }
开发者ID:sime,项目名称:cakephp-braintree-plugin,代码行数:4,代码来源:BraintreeTransparentRedirectHelper.php


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