Page 1 of 1
NVelocity Variable For Failed Payment Reason
Posted: Mon Dec 14, 2009 8:19 am
by jsmits
Is there an NVelocity variable for the reason a payment failed?
Re: NVelocity Variable For Failed Payment Reason
Posted: Mon Dec 14, 2009 8:34 am
by mazhar
All payments are available with order context in Email notification template. All you need is to check status of each payment. For example
Code: Select all
#foreach($payment in $order.Payments)
#if($payment.PaymentStatus == "CaptureFailed")
Do your stuff here against payments with capture failed
#end
#end
Re: NVelocity Variable For Failed Payment Reason
Posted: Mon Dec 14, 2009 10:00 am
by jsmits
Hi Mazhar,
I'd like to send an email on Capture Failed stating the reply from the processor (like invalid expiration) as is shown on the pay my order page if the transaction failed. ('The bank said: Invalid expiration date: 1109').
Is this possible to get with nVelocity?
Re: NVelocity Variable For Failed Payment Reason
Posted: Tue Dec 15, 2009 6:07 am
by mazhar
EDIT MADE [Invalid Comment]
Re: NVelocity Variable For Failed Payment Reason
Posted: Tue Dec 15, 2009 11:30 am
by jsmits
I think payment capture failed and payment authorization failed are both valid triggers, but your approach would make more sense anyway.
The problem I am now having is that neither $order.PaymentStatus or $payment.PaymentStatus seem to return the proper values. The former returns 'unspecified' and the latter returns 'unprocessed' regardless of whether the payment failed or not....
Re: NVelocity Variable For Failed Payment Reason
Posted: Wed Dec 16, 2009 5:53 am
by mazhar
Sorry I made some mistakes in my last comments about events. You are right capture failed and payment authorization failed are both valid triggers try putting your Email template against them.
Re: NVelocity Variable For Failed Payment Reason
Posted: Wed Dec 16, 2009 12:50 pm
by DBounlom
Jsmits,
If you don't mind, could you post the code you edited here? For instance, what did you end up changing in the email template? Thanks.
Re: NVelocity Variable For Failed Payment Reason
Posted: Thu Dec 17, 2009 6:42 am
by jsmits
DBounlom wrote:If you don't mind, could you post the code you edited here? For instance, what did you end up changing in the email template? Thanks.
I haven't decided yet. I think I am just going to fire off an email on payment capture failed with the order number that will go to a person in order fulfillment in my company so they will know not to process the order until paymnet is received. Ablecommerce is great, but we do not plan on using the order management tools from within the admin section, which is why this is an issue.