lib/pay/braintree/billable.rb
def update_braintree_card(token)
        result = gateway.payment_method.create(
          customer_id: processor_id,
          payment_method_nonce: token,
          options: {
            make_default: true,
            verify_card: true
          }
        )
        raise BraintreeError.new(result), result.message unless result.success?

        update_braintree_card_on_file result.payment_method
        update_subscriptions_to_payment_method(result.payment_method.token)
        true
      rescue ::Braintree::AuthorizationError => e
        raise BraintreeAuthorizationError
      rescue ::Braintree::BraintreeError => e
        raise BraintreeError, e.message
      end
# Handles Billable#update_card
#
# Returns true if successful
Handles Billable#update_card
Returns true if successful
Handles Billable#update_card Returns true if successful
def update_braintree_card(token)
        result = gateway.payment_method.create(
          customer_id: processor_id,
          payment_method_nonce: token,
          options: {
            make_default: true,
            verify_card: true
          }
        )
        raise BraintreeError.new(result), result.message unless result.success?
        update_braintree_card_on_file result.payment_method
        update_subscriptions_to_payment_method(result.payment_method.token)
        true
      rescue ::Braintree::AuthorizationError => e
        raise BraintreeAuthorizationError
      rescue ::Braintree::BraintreeError => e
        raise BraintreeError, e.message
      end
def update_braintree_card ( token ) result = gateway . payment_method . create ( customer_id : processor_id , payment_method_nonce : token , options : { make_default : true , verify_card : true } ) raise BraintreeError . new ( result ) , result . message unless result . success? update_braintree_card_on_file result . payment_method update_subscriptions_to_payment_method ( result . payment_method . token ) true rescue :: Braintree :: AuthorizationError => e raise BraintreeAuthorizationError rescue :: Braintree :: BraintreeError => e raise BraintreeError , e . message end
Handles Billable#update_card
Returns true if successful
Handles Billable#update_card Returns true if successful
token