Permalink
Browse files

Fix callback stage of WePay strategy

  • Loading branch information...
1 parent 3744cbc commit 08e28fda4fb25414409e72855f4c1b027f2b259a @ryanwood committed Jul 9, 2011
Showing with 9 additions and 2 deletions.
  1. +2 −1 oa-core/lib/omniauth/core.rb
  2. +7 −1 oa-oauth/lib/omniauth/strategies/oauth2/wepay.rb
@@ -98,7 +98,8 @@ module Utils
'smugmug' => 'SmugMug',
'cas' => 'CAS',
'trademe' => 'TradeMe',
- 'ldap' => 'LDAP'
+ 'ldap' => 'LDAP',
+ 'wepay' => 'WePay'
}
module_function
@@ -34,7 +34,13 @@ def user_data
end
def request_phase
- options[:scope] ||= "manage_accounts,view_balance,collect_payments,refund_payments,view_user"
+ @options[:scope] ||= "manage_accounts,view_balance,collect_payments,refund_payments,view_user"
+ super
+ end
+
+ def callback_phase
+ # Clear out options. WePay token call will fail if unknown keys are passed to it.
+ @options = {}
super
end

0 comments on commit 08e28fd

Please sign in to comment.