Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

Commit

Permalink
Pass payment_provider to AK
Browse files Browse the repository at this point in the history
  • Loading branch information
osahyoun committed Apr 22, 2016
1 parent 61d50f4 commit abe3eb0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/services/action_queue.rb
Expand Up @@ -72,7 +72,7 @@ def extra_fields_for_subscription
class Pusher
def self.push(action)
if action.donation
if action.form_data['payment_provider'].inquiry.go_cardless?
if action.form_data.fetch('payment_provider', '').inquiry.go_cardless?
DirectDebitAction.push(action)
else
DonationAction.push(action)
Expand Down
3 changes: 2 additions & 1 deletion app/services/manage_braintree_donation.rb
Expand Up @@ -28,7 +28,8 @@ def create
transaction_id: transaction.id,
subscription_id: subscription_id,
is_subscription: @is_subscription,
card_expiration_date: transaction.credit_card_details.expiration_date
card_expiration_date: transaction.credit_card_details.expiration_date,
payment_provider: 'braintree'
}.tap do |params|
params[:recurrence_number] = 0 if @is_subscription
end
Expand Down
1 change: 1 addition & 0 deletions spec/requests/api/braintree_spec.rb
Expand Up @@ -51,6 +51,7 @@
fields: {
recurring_id: 1,
recurrence_number: 0,
payment_provider: 'braintree',
exp_date: "1220"
}
}
Expand Down

0 comments on commit abe3eb0

Please sign in to comment.