* BroadleafCommerce Framework
* Copyright (C) 2009 - 2013 Broadleaf Commerce
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
This translates an Order of
into a PaymentRequestDTO.
This method assumes that this translation will apply to a final payment which means that the transaction amount for
It assumes that all other payments (e.g. gift cards/account credit) have already
been applied to the
to be translated
based on the properties of order. This will only utilize the payments that are of type
map to populate necessary request parameters on the resulting
. These additional fields are then used by the payment gateway to construct additional requests to the payment gateway. For instance, this might be use to refund or void the given paymentTransaction
transactionAmountthe amount that should be placed on
paymentTransactionthe transaction whose additional fields should be placed on
for the gateway to use
populated with the additional fields from paymentTransaction and the amount from transactionAmount
public PaymentRequestDTO translatePaymentTransaction(Money transactionAmount, PaymentTransaction paymentTransaction);