Wednesday, March 07, 2007

Problem with Moneris Credit Payment Gayway

http://www.moneris.com

One of our online store client use Moneris merchant account. So we decide integrate Moneris with out credit card payment API. After doing some testing, we found some interesting thing:

1. Moneris required unique order id to be provided in each transaction, include Sale, PreAuth, PostAuth, Credit or Void. In PostAuth and Void case, it also need transaction id.
In some other payment gateway like Verisign, it doesn't need any id in Sale and PreAuth, and ask Reference id only in PostAuth and Void.

2. The amount must contain 3 digits with two penny values.
At our test, the total amount is $12 in shopping card, and comes an error "Incorrect amount parameter:12".

At the beginning I think is doesn't accept integer, which is impossible.

Then I hard code this value(12) in the Moneris eSELECTplus COM object, I found out it's true that the COM object doesn't like integer. But if it's 12.00, it go through.

So the problem is the total amount in pages showing 12.00, and after passing to some function call, when it gets to Moneris, it was so how change to 12. Eventually it's the function "CDbl".

As I found out those two penny values is important. I just format the amount again to keep those and then past it to Moneris. Then everything working great.




But when we direct give a 12.0

No comments: