Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 5.2.0-b1
-
Component/s: None
-
Labels:None
Description
Error when deleting a payment account:
components/gateways/merchant/braintree/braintree.php on line 606 Message: Call to undefined method Braintree\CreditCard::remove()
Solution, replace:
$card = Braintree_CreditCard::remove($account_reference_id);
With
$card = Braintree_CreditCard::delete($account_reference_id);
Error when creating second payment account:
Undefined property on Braintree\Customer: customer on line 49 in /home/billingpreapp100/public_html/components/gateways/merchant/braintree/lib/Braintree/Base.php
Solution, replace braintree::storeCc with
public function storeCc(array $card_info, array $contact, $client_reference_id = null) { $this->loadApi(); // Format card and customer data to be submitted to BrainTree $params = $this->getCardStorageParameters($card_info, $contact); $customer = null; // Retrieve an existing customer from BrainTree if set if (!is_null($client_reference_id)) { try { $customer = Braintree_Customer::find($client_reference_id); } catch (Braintree\Exception\NotFound $ex) { // Do nothing } } // No customer exists, create a new one if (is_null($customer)) { $result = Braintree_Customer::create($params['customer']); // Log customer creation $this->logActions( 'Customer::Create', $result->success, $result, $params['customer'] ); // Customer creation failed if (!$result->success) { return false; } $customer = $result->customer; } // Create new credit card for the customer $params['card']['customerId'] = $customer->id; $card = Braintree_CreditCard::create($params['card']); // Log card creation $this->logActions( 'CreditCard::Create', $card->success, $card, $params['card'] ); // Card creation failed if (!$card->success) { return false; } return [ 'client_reference_id' => $customer->id, 'reference_id' => $card->creditCard->token ]; }
Activity
Jonathan Reissmueller
created issue -
Jonathan Reissmueller
made changes -
Field | Original Value | New Value |
---|---|---|
Rank | Ranked higher |
Jonathan Reissmueller
made changes -
Sprint | 5.2.0 Wrapup [ 142 ] |
Jonathan Reissmueller
made changes -
Rank | Ranked lower |
Jonathan Reissmueller
made changes -
Rank | Ranked higher |
Jonathan Reissmueller
made changes -
Fix Version/s | 5.2.0-b1 [ 11709 ] |
Abdy Franco
made changes -
Assignee | Abdy Franco [ abdy ] |
Abdy Franco
made changes -
Status | Open [ 1 ] | In Progress [ 3 ] |
Abdy Franco
made changes -
Status | In Progress [ 3 ] | In Review [ 5 ] |
Resolution | Fixed [ 1 ] |
Abdy Franco
made changes -
Remaining Estimate | 0 minutes [ 0 ] | |
Time Spent | 34 minutes [ 2040 ] | |
Worklog Id | 15267 [ 15267 ] |
Jonathan Reissmueller
made changes -
Status | In Review [ 5 ] | Closed [ 6 ] |