Trouble with Transaction Post Hook in ASP.Net MVC
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.
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
Support Staff 1 Posted by Marc Guyer on 13 May, 2010 05:54 PM
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.
Marc Guyer closed this discussion on 13 May, 2010 05:54 PM.