Interface PaymentService
-
- All Known Implementing Classes:
DefaultAcceleratorPaymentService,DefaultCisPaymentService
public interface PaymentServiceDefines payment and payment subscription related services
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PaymentDatabeginHopCreatePaymentSubscription(java.lang.String siteName, java.lang.String responseUrl, java.lang.String merchantCallbackUrl, CustomerModel customerModel, CreditCardPaymentInfoModel cardInfo, AddressModel paymentAddress)This method generates the Hosted Order Page request data which includes all data required to create a subscription (customer profile).PaymentDatabeginSopCreatePaymentSubscription(java.lang.String siteName, java.lang.String responseUrl, java.lang.String merchantCallbackUrl, CustomerModel customerModel, CreditCardPaymentInfoModel cardInfo, AddressModel paymentAddress)This method generates the Hosted Order Page request data which includes all data required to create a subscription (customer profile).PaymentSubscriptionResultItemcompleteHopCreatePaymentSubscription(CustomerModel customerModel, boolean saveInAccount, java.util.Map<java.lang.String,java.lang.String> parameters)This method creates a subscription internally with the result parameters obtained from the provider's Hosted Order Page.PaymentSubscriptionResultItemcompleteSopCreatePaymentSubscription(CustomerModel customerModel, boolean saveInAccount, java.util.Map<java.lang.String,java.lang.String> parameters)This method creates a subscription internally with the result parameters obtained from the provider's Silent Order Post.voidhandleCreateSubscriptionCallback(java.util.Map<java.lang.String,java.lang.String> parameters)This method attempts to validate the payment info with a given subscriptionId.voidhandleFraudUpdateCallback(java.util.Map<java.lang.String,java.lang.String> parameters)Uses the fraud call back strategy to handle fraud call backvoidsetPaymentTransactionReviewResult(PaymentTransactionEntryModel reviewDecisionEntry, java.lang.String orderCode)This method adds a new PaymentTransactionEntry of type REVIEW_DECISION to the order.
-
-
-
Method Detail
-
beginHopCreatePaymentSubscription
PaymentData beginHopCreatePaymentSubscription(java.lang.String siteName, java.lang.String responseUrl, java.lang.String merchantCallbackUrl, CustomerModel customerModel, CreditCardPaymentInfoModel cardInfo, AddressModel paymentAddress)
This method generates the Hosted Order Page request data which includes all data required to create a subscription (customer profile). The request data will be sent to the HOP/SOP URL in a POST method.- Parameters:
siteName- - The name of the current CMS siteresponseUrl- - The URL used by the CMS site to handle responses from the Hosted Order Page or Silent Order Post.merchantCallbackUrl- - The URL of the MerchantCallbackController used by the Provider to send validation responses.customerModel- - The Customer details.cardInfo- - If available will contain any existing credit card details used to pre-populate the HOP.paymentAddress- - If available contains the customer's billing address, used to pre-populate the HOP.- Returns:
- a
PaymentDataobject which contains all data required to create a subscription.
-
beginSopCreatePaymentSubscription
PaymentData beginSopCreatePaymentSubscription(java.lang.String siteName, java.lang.String responseUrl, java.lang.String merchantCallbackUrl, CustomerModel customerModel, CreditCardPaymentInfoModel cardInfo, AddressModel paymentAddress)
This method generates the Hosted Order Page request data which includes all data required to create a subscription (customer profile). The request data will be sent to the HOP/SOP URL in a POST method.- Parameters:
siteName- - The name of the current CMS siteresponseUrl- - The URL used by the CMS site to handle responses from the Hosted Order Page or Silent Order Post.merchantCallbackUrl- - The URL of the MerchantCallbackController used by the Provider to send validation responses.customerModel- - The Customer details.cardInfo- - If available will contain any existing credit card details used to pre-populate the HOP.paymentAddress- - If available contains the customer's billing address, used to pre-populate the HOP.- Returns:
- a
PaymentDataobject which contains all data required to create a subscription.
-
completeHopCreatePaymentSubscription
PaymentSubscriptionResultItem completeHopCreatePaymentSubscription(CustomerModel customerModel, boolean saveInAccount, java.util.Map<java.lang.String,java.lang.String> parameters)
This method creates a subscription internally with the result parameters obtained from the provider's Hosted Order Page. Only basic customer information and a subscription id is stored internally. All customer information is stored on the provider's system including credit card number and security code. The subscription id is used for future lookup for obtaining the customer's credit card details.- Parameters:
customerModel- - The Customer details.saveInAccount- - Flag indicating if this new payment card will be stored in the customer's profile.parameters- - a Map of key-value paired Strings with the result data returned from the Hosted Order Page.- Returns:
- a
PaymentSubscriptionResultItemobject which contains the newly created credit card.
-
completeSopCreatePaymentSubscription
PaymentSubscriptionResultItem completeSopCreatePaymentSubscription(CustomerModel customerModel, boolean saveInAccount, java.util.Map<java.lang.String,java.lang.String> parameters)
This method creates a subscription internally with the result parameters obtained from the provider's Silent Order Post. Only basic customer information and a subscription id is stored internally. All customer information is stored on the provider's system including credit card number and security code. The subscription id is used for future lookup for obtaining the customer's credit card details.- Parameters:
customerModel- - The Customer details.saveInAccount- - Flag indicating if this new payment card will be stored in the customer's profile.parameters- - a Map of key-value paired Strings with the result data returned from the Hosted Order Page.- Returns:
- a
PaymentSubscriptionResultItemobject which contains the newly created credit card.
-
handleCreateSubscriptionCallback
void handleCreateSubscriptionCallback(java.util.Map<java.lang.String,java.lang.String> parameters)
This method attempts to validate the payment info with a given subscriptionId. Validation should only pass if both the payment info and the valid subscription exists for this subscriptionId.- Parameters:
parameters- - a Map of key-value paired Strings with the result data returned from the callback handler.
-
handleFraudUpdateCallback
void handleFraudUpdateCallback(java.util.Map<java.lang.String,java.lang.String> parameters)
Uses the fraud call back strategy to handle fraud call back- Parameters:
parameters- a Map of key-value paired Strings with the result data returned from the callback handler
-
setPaymentTransactionReviewResult
void setPaymentTransactionReviewResult(PaymentTransactionEntryModel reviewDecisionEntry, java.lang.String orderCode)
This method adds a new PaymentTransactionEntry of type REVIEW_DECISION to the order. It also send event to allow submitorder proccess to end waitForReviewDecision action.- Parameters:
reviewDecisionEntry- - payment transaction entry of REVIEW_DECISION typeorderCode- - identifier of order for which review decision entry should be added
-
-