public interface PaymentService
| Modifier and Type | Method and Description |
|---|---|
void |
attachPaymentInfo(PaymentTransactionModel paymentTransactionModel,
UserModel userModel,
CardInfo cardInfo,
BigDecimal amount)
Attaches PaymentInfo to the assigned PaymentTransactionModel instance.
|
PaymentTransactionEntryModel |
authorize(OrderModel order,
CardInfo card)
Deprecated.
|
PaymentTransactionEntryModel |
authorize(PaymentTransactionModel transaction,
BigDecimal amount,
Currency currency,
AddressModel deliveryAddress,
AddressModel paymentAddress,
CardInfo card)
authorize payment
|
PaymentTransactionEntryModel |
authorize(PaymentTransactionModel transaction,
BigDecimal amount,
Currency currency,
AddressModel deliveryAddress,
String subscriptionID)
authorize payment
|
PaymentTransactionEntryModel |
authorize(PaymentTransactionModel transaction,
BigDecimal amount,
Currency currency,
AddressModel deliveryAddress,
String subscriptionID,
String paymentProvider)
authorize payment
|
PaymentTransactionEntryModel |
authorize(String merchantTransactionCode,
BigDecimal amount,
Currency currency,
AddressModel deliveryAddress,
AddressModel paymentAddress,
CardInfo card)
authorize payment
|
PaymentTransactionEntryModel |
authorize(String merchantTransactionCode,
BigDecimal amount,
Currency currency,
AddressModel deliveryAddress,
String subscriptionID)
authorize payment
|
PaymentTransactionEntryModel |
authorize(String merchantTransactionCode,
BigDecimal amount,
Currency currency,
AddressModel deliveryAddress,
String subscriptionID,
String cv2,
String paymentProvider)
authorize payment
|
PaymentTransactionEntryModel |
cancel(PaymentTransactionEntryModel transaction)
Cancel payment
|
PaymentTransactionEntryModel |
capture(PaymentTransactionModel transaction)
capture payment
|
NewSubscription |
createSubscription(PaymentTransactionModel transaction,
AddressModel paymentAddress,
CardInfo card)
Creates a subscription at the payment provider side and stores sensitive data there.
|
NewSubscription |
createSubscription(String merchantTransactionCode,
String paymentProvider,
Currency currency,
AddressModel paymentAddress,
CardInfo card)
Creates a subscription at the payment provider side and stores sensitive data there.
|
PaymentTransactionEntryModel |
deleteSubscription(String merchantTransactionCode,
String subscriptionID,
String paymentProvider)
Deletes the subscription at the payment provider.
|
String |
getNewPaymentTransactionEntryCode(PaymentTransactionModel transaction,
PaymentTransactionType paymentTransactionType)
A new code for a
PaymentTransactionEntryModel based on the PaymentTransactionModel associated to
it and the number of entries. |
PaymentTransactionModel |
getPaymentTransaction(String code)
Get
PaymentTransactionModel by code |
PaymentTransactionEntryModel |
getPaymentTransactionEntry(String code)
Get
PaymentTransactionEntryModel by code |
PaymentTransactionEntryModel |
getSubscriptionData(String merchantTransactionCode,
String subscriptionID,
String paymentProvider,
BillingInfo billingInfo,
CardInfo card)
Gets the stored card info or payment address
|
PaymentTransactionEntryModel |
partialCapture(PaymentTransactionModel transaction,
BigDecimal amount)
Take a partial capture of authorized transaction
|
PaymentTransactionEntryModel |
refundFollowOn(PaymentTransactionModel transaction,
BigDecimal amount)
Refund transaction
|
PaymentTransactionEntryModel |
refundStandalone(StandaloneRefundRequest request)
|
PaymentTransactionEntryModel |
refundStandalone(String merchantTransactionCode,
BigDecimal amount,
Currency currency,
AddressModel paymentAddress,
CardInfo card)
Refund value to a card (no transaction is obligatory)
|
PaymentTransactionEntryModel |
updateSubscription(String merchantTransactionCode,
String subscriptionID,
String paymentProvider,
AddressModel paymentAddress,
CardInfo card)
Updates the data of the subscription at the payment provider.
|
@Deprecated PaymentTransactionEntryModel authorize(OrderModel order, CardInfo card) throws AdapterException
order - the ordercard - the cardAdapterExceptionPaymentTransactionEntryModel authorize(String merchantTransactionCode, BigDecimal amount, Currency currency, AddressModel deliveryAddress, String subscriptionID) throws AdapterException
merchantTransactionCode - the transaction codeamount - the amountcurrency - the currencydeliveryAddress - the delivery address (paymentAddress is used if null)subscriptionID - the subscriptionIDAdapterExceptionPaymentTransactionEntryModel authorize(String merchantTransactionCode, BigDecimal amount, Currency currency, AddressModel deliveryAddress, String subscriptionID, String cv2, String paymentProvider) throws AdapterException
merchantTransactionCode - the transaction codeamount - the amountcurrency - the currencydeliveryAddress - the delivery address (paymentAddress is used if null)subscriptionID - the subscriptionIDcv2 - paymentProvider - AdapterExceptionPaymentTransactionEntryModel authorize(String merchantTransactionCode, BigDecimal amount, Currency currency, AddressModel deliveryAddress, AddressModel paymentAddress, CardInfo card) throws AdapterException
merchantTransactionCode - the transaction codeamount - the amountcurrency - the currencydeliveryAddress - the delivery address (paymentAddress is used if null)paymentAddress - the payment addresscard - the cardAdapterExceptionPaymentTransactionEntryModel authorize(PaymentTransactionModel transaction, BigDecimal amount, Currency currency, AddressModel deliveryAddress, String subscriptionID, String paymentProvider) throws AdapterException
transaction - the payment transactionamount - the amountcurrency - the currencydeliveryAddress - the delivery address (paymentAddress is used if null)subscriptionID - the subscriptionIDpaymentProvider - AdapterExceptionPaymentTransactionEntryModel authorize(PaymentTransactionModel transaction, BigDecimal amount, Currency currency, AddressModel deliveryAddress, String subscriptionID) throws AdapterException
transaction - the payment transactionamount - the amountcurrency - the currencydeliveryAddress - the delivery address (paymentAddress is used if null)subscriptionID - the subscriptionIDAdapterExceptionPaymentTransactionEntryModel authorize(PaymentTransactionModel transaction, BigDecimal amount, Currency currency, AddressModel deliveryAddress, AddressModel paymentAddress, CardInfo card) throws AdapterException
transaction - the payment transactionamount - the amountcurrency - the currencydeliveryAddress - the delivery address (paymentAddress is used if null)paymentAddress - the payment addresscard - the cardAdapterExceptionPaymentTransactionEntryModel capture(PaymentTransactionModel transaction) throws AdapterException
transaction - payment transactionAdapterExceptionPaymentTransactionEntryModel cancel(PaymentTransactionEntryModel transaction) throws AdapterException
transaction - payment transactionAdapterExceptionPaymentTransactionEntryModel refundFollowOn(PaymentTransactionModel transaction, BigDecimal amount) throws AdapterException
transaction - payment transactionamount - amount to refundAdapterException@Deprecated PaymentTransactionEntryModel refundStandalone(StandaloneRefundRequest request) throws AdapterException
request - AdapterExceptionPaymentTransactionEntryModel refundStandalone(String merchantTransactionCode, BigDecimal amount, Currency currency, AddressModel paymentAddress, CardInfo card) throws AdapterException
merchantTransactionCode - any code to locate transactionamount - amount to refundcurrency - currencypaymentAddress - address to refundcard - card to refundAdapterExceptionPaymentTransactionEntryModel partialCapture(PaymentTransactionModel transaction, BigDecimal amount) throws AdapterException
transaction - authorized transactionamount - value to captureAdapterExceptionPaymentTransactionModel getPaymentTransaction(String code)
PaymentTransactionModel by codecode - the code of the PaymentTransactionModel we were looking forPaymentTransactionModelPaymentTransactionEntryModel getPaymentTransactionEntry(String code)
PaymentTransactionEntryModel by codecode - the code of the PaymentTransactionModel we were looking forPaymentTransactionEntryModelvoid attachPaymentInfo(PaymentTransactionModel paymentTransactionModel, UserModel userModel, CardInfo cardInfo, BigDecimal amount)
paymentTransactionModel - the payment transactionuserModel - the usercardInfo - the card infoamount - the amountNewSubscription createSubscription(PaymentTransactionModel transaction, AddressModel paymentAddress, CardInfo card) throws AdapterException
transaction - a previous recent successful authorize payment transactionpaymentAddress - the same billing address as for the authorize txncard - the same card as for the authorize txnAdapterExceptionNewSubscription createSubscription(String merchantTransactionCode, String paymentProvider, Currency currency, AddressModel paymentAddress, CardInfo card) throws AdapterException
merchantTransactionCode - the transactionCodepaymentProvider - the paymentProvider who will hold the subscription. You might also have just one payment provider in
your implementation.currency - the default customer's currencypaymentAddress - the same billing address as for the authorize txncard - the same card as for the authorize txnAdapterExceptionPaymentTransactionEntryModel updateSubscription(String merchantTransactionCode, String subscriptionID, String paymentProvider, AddressModel paymentAddress, CardInfo card) throws AdapterException
merchantTransactionCode - the transactionCodesubscriptionID - the subscription IDpaymentProvider - the paymentProvider who holds the subscription. You get this value from the
PaymentTransactionModel of the createSubscription command. You might also have just one payment
provider in your implementation.paymentAddress - the new billing address, could be nullcard - the updated card, could be nullAdapterExceptionPaymentTransactionEntryModel getSubscriptionData(String merchantTransactionCode, String subscriptionID, String paymentProvider, BillingInfo billingInfo, CardInfo card) throws AdapterException
merchantTransactionCode - the transactionCodesubscriptionID - the subscription IDpaymentProvider - the paymentProvider who holds the subscription. You get this value from the
PaymentTransactionModel of the createSubscription command. You might also have just one payment
provider in your implementation.billingInfo - the billing address is returned in this DTOcard - the card information is returned in this DTOAdapterExceptionPaymentTransactionEntryModel deleteSubscription(String merchantTransactionCode, String subscriptionID, String paymentProvider) throws AdapterException
merchantTransactionCode - the transactionCodesubscriptionID - the subscription IDpaymentProvider - the paymentProvider who holds the subscription. You get this value from the
PaymentTransactionModel of the createSubscription command. You might also have just one payment
provider in your implementation.AdapterExceptionString getNewPaymentTransactionEntryCode(PaymentTransactionModel transaction, PaymentTransactionType paymentTransactionType)
PaymentTransactionEntryModel based on the PaymentTransactionModel associated to
it and the number of entries.transaction - An associated Payment transactionpaymentTransactionType - A type of entry.Copyright © 2017 SAP SE. All Rights Reserved.