use of org.pac4j.oauth.client.PayPalClient in project cas by apereo.
the class DelegatedClientFactory method configurePaypalClient.
/**
* Configure paypal client.
*
* @param properties the properties
*/
protected void configurePaypalClient(final Collection<BaseClient> properties) {
final Pac4jDelegatedAuthenticationProperties.Paypal paypal = pac4jProperties.getPaypal();
if (StringUtils.isNotBlank(paypal.getId()) && StringUtils.isNotBlank(paypal.getSecret())) {
final PayPalClient client = new PayPalClient(paypal.getId(), paypal.getSecret());
configureClient(client, paypal);
LOGGER.debug("Created client [{}] with identifier [{}]", client.getName(), client.getKey());
properties.add(client);
}
}
use of org.pac4j.oauth.client.PayPalClient in project cas by apereo.
the class DefaultDelegatedClientFactory method configurePayPalClient.
/**
* Configure paypal client.
*
* @param properties the properties
*/
protected void configurePayPalClient(final Collection<IndirectClient> properties) {
val pac4jProperties = casProperties.getAuthn().getPac4j();
val paypal = pac4jProperties.getPaypal();
if (paypal.isEnabled() && StringUtils.isNotBlank(paypal.getId()) && StringUtils.isNotBlank(paypal.getSecret())) {
val client = new PayPalClient(paypal.getId(), paypal.getSecret());
configureClient(client, paypal);
LOGGER.debug("Created client [{}] with identifier [{}]", client.getName(), client.getKey());
properties.add(client);
}
}
use of org.pac4j.oauth.client.PayPalClient in project cas by apereo.
the class Pac4jAuthenticationEventExecutionPlanConfiguration method configurePaypalClient.
private void configurePaypalClient(final Collection<BaseClient> properties) {
final Pac4jProperties.Paypal paypal = casProperties.getAuthn().getPac4j().getPaypal();
if (StringUtils.isNotBlank(paypal.getId()) && StringUtils.isNotBlank(paypal.getSecret())) {
final PayPalClient client = new PayPalClient(paypal.getId(), paypal.getSecret());
properties.add(client);
}
}
use of org.pac4j.oauth.client.PayPalClient in project pac4j by pac4j.
the class RunPaypalClient method getClient.
@Override
protected IndirectClient getClient() {
final PayPalClient payPalClient = new PayPalClient("ARQFlBAOdRsb1NhZlutHT_PORP2F-TQpU-Laz-osaBwAHUIBIdg-C8DEsTWY", "EAMZPBBfYJGeCBHYkm30xqC-VZ1kePnWZzPLdXyzY43rh-q0OQUH5eucXI6R");
payPalClient.setCallbackUrl(PAC4J_BASE_URL);
return payPalClient;
}
Aggregations