Class: Cabernet::PaypalPermissionGateway
- Inherits:
-
Object
- Object
- Cabernet::PaypalPermissionGateway
- Defined in:
- lib/cabernet.rb
Class Method Summary collapse
-
.get_access_token(request_token, verification_code) ⇒ Object
Update the merchant record that was created during registration with the permission token and secret for the current user.
-
.request_permissions(access_token_callback_url) ⇒ Object
access_token_callback_url : Callback URL is the return URL to your server .
Class Method Details
.get_access_token(request_token, verification_code) ⇒ Object
Update the merchant record that was created during registration with the permission token and secret for the current user.
request_token : token that was obtained in previous call verification_code : code that was obtained in the callback to your server
Returns : Access token response object
34 35 36 37 38 39 40 41 42 |
# File 'lib/cabernet.rb', line 34 def self.get_access_token(request_token, verification_code) # Build request object token_request = api.build_get_access_token token_request.token = request_token token_request.verifier = verification_code # Make API call & get token_response api.get_access_token(token_request) end |
.request_permissions(access_token_callback_url) ⇒ Object
access_token_callback_url : Callback URL is the return URL to your server
Returns : Request token string (used in the next call)
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/cabernet.rb', line 13 def self.(access_token_callback_url) # Build request object = api. .scope = ["EXPRESS_CHECKOUT"] .callback = access_token_callback_url # Make API call & get response = api.() # Access Response .token end |