public class DefaultPaymentRequestService extends Object implements PaymentRequestService
Constructor and Description |
---|
DefaultPaymentRequestService() |
Modifier and Type | Method and Description |
---|---|
com.broadleafcommerce.paymentgateway.domain.PaymentRequest |
createPaymentRequest(@NonNull com.broadleafcommerce.cart.client.domain.Cart cart,
@NonNull com.broadleafcommerce.order.common.domain.Payment payment,
@NonNull com.broadleafcommerce.order.common.domain.PaymentTransaction paymentTransaction)
Creates a
PaymentRequest , based on the provided Cart , Payment , &
PaymentTransaction , which will drive the authorization transaction in
PaymentGatewayTransactionService.authorize(PaymentRequest) . |
protected void |
populateBillTo(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest,
@NonNull com.broadleafcommerce.order.common.domain.Payment payment) |
protected void |
populateCustomerInfo(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest,
@NonNull com.broadleafcommerce.cart.client.domain.Cart cart) |
protected void |
populatePaymentGatewayProperties(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest,
@NonNull com.broadleafcommerce.order.common.domain.Payment payment)
Copy additional fields from Payment into the PaymentRequest.
|
protected void |
populateShipTo(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest,
@NonNull com.broadleafcommerce.cart.client.domain.Cart cart) |
protected void |
populateTransactionProperties(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest,
@NonNull com.broadleafcommerce.order.common.domain.PaymentTransaction paymentTransaction)
Populates
PaymentRequest.getAdditionalFields() based on the contents of the provided
PaymentTransaction |
public com.broadleafcommerce.paymentgateway.domain.PaymentRequest createPaymentRequest(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart, @NonNull @NonNull com.broadleafcommerce.order.common.domain.Payment payment, @NonNull @NonNull com.broadleafcommerce.order.common.domain.PaymentTransaction paymentTransaction)
PaymentRequest
, based on the provided Cart
, Payment
, &
PaymentTransaction
, which will drive the authorization transaction in
PaymentGatewayTransactionService.authorize(PaymentRequest)
.
NOTE: Some gateways will perform checks against these totals. Since these price data points
don't directly reference cartPricing.getAdjustmentsTotal(), the value for
cartPricing.getTotal() MUST include the adjustments.createPaymentRequest
in interface PaymentRequestService
cart
- the owning cartpayment
- the cart's payment that is to be authorizedpaymentTransaction
- the cart payment's pending representation of the transaction that
is to be executedprotected void populateCustomerInfo(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest, @NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart)
protected void populateShipTo(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest, @NonNull @NonNull com.broadleafcommerce.cart.client.domain.Cart cart)
protected void populateBillTo(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest, @NonNull @NonNull com.broadleafcommerce.order.common.domain.Payment payment)
protected void populatePaymentGatewayProperties(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest, @NonNull @NonNull com.broadleafcommerce.order.common.domain.Payment payment)
paymentRequest
- payment
- protected void populateTransactionProperties(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest, @NonNull @NonNull com.broadleafcommerce.order.common.domain.PaymentTransaction paymentTransaction)
PaymentRequest.getAdditionalFields()
based on the contents of the provided
PaymentTransaction
paymentRequest
- paymentTransaction
- Copyright © 2021. All rights reserved.