
com.paypal.core.request.RefreshTokenRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of com.liferay.commerce.payment.method.paypal
Show all versions of com.liferay.commerce.payment.method.paypal
Liferay Commerce Payment Method PayPal
package com.paypal.core.request;
import com.paypal.http.Headers;
import com.paypal.http.HttpRequest;
import com.paypal.core.PayPalEnvironment;
import com.paypal.core.object.RefreshToken;
import java.util.HashMap;
import java.util.Map;
public class RefreshTokenRequest extends HttpRequest {
public RefreshTokenRequest(PayPalEnvironment credentials, String authorizationCode) {
super("/v1/identity/openidconnect/tokenservice", "POST", RefreshToken.class);
header(Headers.CONTENT_TYPE, "application/x-www-form-urlencoded");
header(Headers.AUTHORIZATION, credentials.authorizationString());
Map params = new HashMap() {{
put("grant_type", "authorization_code");
put("code", authorizationCode);
}};
requestBody(params);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy