java.lang.Object
com.aoapps.payments.stripe.Stripe
- All Implemented Interfaces:
MerchantServicesProvider
Provider for Stripe.
Configuration parameters:
- apiKey - the Stripe account secret key
TODO: Support testMode with optional testApiKey. This would require testMode on CreditCard, too.
TODO: Support Stripe.js
TODO: Support Idempotent Requests with automatic retry on network errors.
TODO: Support Request IDs.
TODO: Support Collecting application fees?
TODO: Can we get this listed as a community library or plugin-in?
TODO: Might be better to switch to Subscriptions for stored card implementation.
- Author:
- AO Industries, Inc.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionauthorize
(TransactionRequest transactionRequest, CreditCard creditCard) boolean
boolean
capture
(AuthorizationResult authorizationResult) credit
(TransactionRequest transactionRequest, CreditCard creditCard) void
deleteCreditCard
(CreditCard creditCard) Gets the API secret key.getTokenizedCreditCards
(Map<String, CreditCard> persistedCards, PrintWriter verboseOut, PrintWriter infoOut, PrintWriter warningOut) sale
(TransactionRequest transactionRequest, CreditCard creditCard) storeCreditCard
(CreditCard creditCard) See Create a customer. See Create a PaymentMethod. See Attach a PaymentMethod to a Customer. See Update a customer.void
updateCreditCard
(CreditCard creditCard) void
updateCreditCardExpiration
(CreditCard creditCard, byte expirationMonth, short expirationYear) void
updateCreditCardNumberAndExpiration
(CreditCard creditCard, String cardNumber, byte expirationMonth, short expirationYear, String cardCode) voidTransaction
(Transaction transaction)
-
Constructor Details
-
Stripe
Creates a new String provider.
-
-
Method Details
-
getProviderId
- Specified by:
getProviderId
in interfaceMerchantServicesProvider
-
getApiKey
Gets the API secret key. -
sale
- Specified by:
sale
in interfaceMerchantServicesProvider
-
authorize
- Specified by:
authorize
in interfaceMerchantServicesProvider
-
capture
- Specified by:
capture
in interfaceMerchantServicesProvider
-
voidTransaction
- Specified by:
voidTransaction
in interfaceMerchantServicesProvider
-
credit
- Specified by:
credit
in interfaceMerchantServicesProvider
-
canStoreCreditCards
public boolean canStoreCreditCards()- Specified by:
canStoreCreditCards
in interfaceMerchantServicesProvider
-
storeCreditCard
- See Create a customer.
- See Create a PaymentMethod.
- See Attach a PaymentMethod to a Customer.
- See Update a customer.
- Specified by:
storeCreditCard
in interfaceMerchantServicesProvider
- Throws:
IOException
-
updateCreditCard
- See Update a customer.
- See Update a PaymentMethod.
- See Delete a card.
- See Update a card.
- Specified by:
updateCreditCard
in interfaceMerchantServicesProvider
- Throws:
IOException
-
updateCreditCardNumberAndExpiration
public void updateCreditCardNumberAndExpiration(CreditCard creditCard, String cardNumber, byte expirationMonth, short expirationYear, String cardCode) throws IOException - Specified by:
updateCreditCardNumberAndExpiration
in interfaceMerchantServicesProvider
- Throws:
IOException
-
updateCreditCardExpiration
public void updateCreditCardExpiration(CreditCard creditCard, byte expirationMonth, short expirationYear) throws IOException - See Update a PaymentMethod.
- See Delete a card.
- See Update a card.
- Specified by:
updateCreditCardExpiration
in interfaceMerchantServicesProvider
- Throws:
IOException
-
deleteCreditCard
See Delete a customer.
- Specified by:
deleteCreditCard
in interfaceMerchantServicesProvider
- Throws:
IOException
-
canGetTokenizedCreditCards
public boolean canGetTokenizedCreditCards()- Specified by:
canGetTokenizedCreditCards
in interfaceMerchantServicesProvider
-
getTokenizedCreditCards
public Map<String,TokenizedCreditCard> getTokenizedCreditCards(Map<String, CreditCard> persistedCards, PrintWriter verboseOut, PrintWriter infoOut, PrintWriter warningOut) throws IOExceptionSee List all customers.
- Specified by:
getTokenizedCreditCards
in interfaceMerchantServicesProvider
- Throws:
IOException
-