Skip to content

Commit

Permalink
Use toPlainString from ObjectUtilities to avoid exponential format th…
Browse files Browse the repository at this point in the history
…at is the default for BigDecimal but not supported by Authorize.NET
  • Loading branch information
jonesde committed Jul 23, 2017
1 parent 8eb6d87 commit 3fabeeb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion service/AuthorizeDotNet/AimPaymentServices.xml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ along with this software (see the LICENSE.md file). If not, see
<set field="cardTypeCode" from="creditCard.creditCardTypeEnumId?.charAt(3)"/>
<!-- TODO, future: support x_method:'ECHECK' for BankAccount records -->
<set field="paymentInfoMap" from="[x_method:'CC',
x_amount:payment.amount, x_currency_code:payment.amountUomId,
x_amount:toPlainString(payment.amount), x_currency_code:payment.amountUomId,
x_card_num:creditCard.cardNumber, x_exp_date:creditCard.expireDate,
x_card_code:creditCard.cardSecurityCode, x_card_type:cardTypeCode,
x_first_name:paymentMethod.firstNameOnAccount, x_last_name:paymentMethod.lastNameOnAccount,
Expand Down
8 changes: 4 additions & 4 deletions service/AuthorizeDotNet/CimPaymentServices.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ along with this software (see the LICENSE.md file). If not, see
<createCustomerProfileTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication><name>${pgan.login}</name><transactionKey>${pgan.tranKey}</transactionKey></merchantAuthentication>
<transaction><profileTransAuthOnly>
<amount>${payment.amount}</amount>
<amount>${toPlainString(payment.amount)}</amount>
<customerProfileId>${party.gatewayCimId}</customerProfileId>
<customerPaymentProfileId>${paymentMethod.gatewayCimId}</customerPaymentProfileId>
<order><invoiceNumber>${payment.orderId}</invoiceNumber></order>
Expand Down Expand Up @@ -102,7 +102,7 @@ along with this software (see the LICENSE.md file). If not, see
<createCustomerProfileTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication><name>${pgan.login}</name><transactionKey>${pgan.tranKey}</transactionKey></merchantAuthentication>
<transaction><profileTransPriorAuthCapture>
<amount>${amount ?: payment.amount}</amount>
<amount>${toPlainString(amount ?: payment.amount)}</amount>
<customerProfileId>${party.gatewayCimId}</customerProfileId>
<customerPaymentProfileId>${paymentMethod.gatewayCimId}</customerPaymentProfileId>
<transId>${paymentRefNum}</transId>
Expand Down Expand Up @@ -153,7 +153,7 @@ along with this software (see the LICENSE.md file). If not, see
<createCustomerProfileTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication><name>${pgan.login}</name><transactionKey>${pgan.tranKey}</transactionKey></merchantAuthentication>
<transaction><profileTransAuthCapture>
<amount>${payment.amount}</amount>
<amount>${toPlainString(payment.amount)}</amount>
<customerProfileId>${party.gatewayCimId}</customerProfileId>
<customerPaymentProfileId>${paymentMethod.gatewayCimId}</customerPaymentProfileId>
<order><invoiceNumber>${payment.orderId}</invoiceNumber></order>
Expand Down Expand Up @@ -245,7 +245,7 @@ along with this software (see the LICENSE.md file). If not, see
<createCustomerProfileTransactionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication><name>${pgan.login}</name><transactionKey>${pgan.tranKey}</transactionKey></merchantAuthentication>
<transaction><profileTransRefund>
<amount>${amount ?: payment.amount}</amount>
<amount>${toPlainString(amount ?: payment.amount)}</amount>
<customerProfileId>${party.gatewayCimId}</customerProfileId>
<customerPaymentProfileId>${paymentMethod.gatewayCimId}</customerPaymentProfileId>
<order><invoiceNumber>${payment.orderId}</invoiceNumber></order>
Expand Down

0 comments on commit 3fabeeb

Please sign in to comment.