Trouble with Transaction Post Hook in ASP.Net MVC

joel.cogley's Avatar

joel.cogley

13 May, 2010 01:05 AM

Hey Guys,

I'm got a .net MVC controller handling the transaction post hook, and I've a bit of a problem with the $ amount of transaction. Namely, everything's hitting my database $0.00. All the other fields save without a problem. Here's the actual code:

 public void PostedTransaction(FormCollection collection)
    {

        TransactionPost transactionPost = new TransactionPost();

        transactionPost.customer.code = collection["customer[code]"];
        transactionPost.customer.id = collection["customer[id]"];

        transactionPost.invoice.id = new Guid(collection["invoice[id]"]);
        transactionPost.invoice.invoiceNumber = collection["invoice[invoiceNumber]"];
        transactionPost.invoice.type = collection["invoice[type]"];

        transactionPost.transaction.id = new Guid(collection["invoice[id]"]);
        transactionPost.transaction.amount = Convert.ToDecimal(collection["invoice[amount]"]);
        transactionPost.transaction.transactedDatetime =
            Convert.ToDateTime(collection["transaction[transactedDatetime]"]);
        transactionPost.transaction.response = collection["transaction[response]"];

        _transactionPostRepository.Insert(transactionPost);
}

Has anyone else run into this issue?

Thanks in advance!

--J

EDIT: The account is still in test mode, using test CC numbers.

  1. Support Staff 1 Posted by Marc Guyer on 13 May, 2010 05:54 PM

    Marc Guyer's Avatar

    Joel -- If a customer is subscribed to a "free" plan, they still have recurring invoices that transact - the amount is zero. The behavior is the same as a paid plan if the customer's current invoice is zero or negative. In other words, what you're seeing is normal, unless of course, the transactions in question should be more than zero dollars.

    We don't have any experience with .Net here so we can't vouch for your code but it's probably fine.

  2. Marc Guyer closed this discussion on 13 May, 2010 05:54 PM.

Discussions are closed to public comments.
If you need help with Cheddar please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

28 Mar, 2024 10:45 PM
24 Jan, 2024 08:33 AM
11 Jan, 2024 07:13 AM
30 Nov, 2023 02:07 AM
22 Nov, 2023 08:41 AM