Reputation: 53
I am trying to generate access token for paypal for future payment using PayPal-Ruby-SDK example.
it "Exchange Authorization Code for Refresh / Access Tokens" do
# put your authorization code for testing here
auth_code = ''
if auth_code != ''
access_token = FuturePayment.exch_token(auth_code)
access_token.should_not be_nil
end
end
It requires an authorization code which I am unable to find how to generate. Any Help will be highly obliged.
Upvotes: 4
Views: 1532
Reputation: 764
You can't do this. You have to make API calls to create reference transactions:
https://github.com/paypal/PayPal-REST-API-issues/issues/44
Scroll to the bottom of that issue - looks like at least they're offering some kind of limited access to a REST API so you can skip their SOAP stuff.
Upvotes: 0
Reputation: 11
You are able to get Authorization Code only via PayPal web login flow. According to Paypal's official documentation .
Upvotes: 1
Reputation: 10000
The authorization code is part of your application details that were provided to you when you registered your application at developer.paypal.com, and you can view your application there to get the code.
Upvotes: -1