spec/integration/braintree/transaction_spec.rb in braintree-4.11.0 vs spec/integration/braintree/transaction_spec.rb in braintree-4.12.0
- old
+ new
@@ -7259,6 +7259,21 @@
expect(adjustment_transaction.transaction.amount.should).to eq(BigDecimal("75.50"))
expect(adjustment_transaction.errors.for(:transaction).on(:base).first.code).to eq(Braintree::ErrorCodes::Transaction::ProcessorDoesNotSupportPartialAuthReversal)
end
end
end
+
+ context "Merchant Advice Code" do
+ it "exposes MAC and MAC text" do
+ result = Braintree::Transaction.create(
+ :type => "sale",
+ :amount => Braintree::Test::TransactionAmounts::Decline,
+ :credit_card => {
+ :number => Braintree::Test::CreditCardNumbers::MasterCard,
+ :expiration_date => DateTime.now.strftime("%m/%Y")
+ },
+ )
+ expect(result.transaction.merchant_advice_code).to eq("01")
+ expect(result.transaction.merchant_advice_code_text).to eq("New account information available")
+ end
+ end
end