Discussions
CC transactions failed or not?
Hi all,
I'm attempting to write a schedule script that does the following:
1. Take pre-existing customer sales orders and transforms to cash sales
2. Transacts against customer credit card
- if failed, then email with a 'failure receipt'
-else email with receipt
Using scripts I can generate sales orders, pre-populate with the customers credit card details and transform to a cash sale. What I need to know is upon saving the cash sale (nlapiSubmitRecord), how do I know if the credit card was a) approved and b) debited appropriately (using scripts)?
The second question related to reciept emails, I can use 'tobeemailed' however that email is sent regardless of whether the transaction was successful or not. I just need to change one line in the standard template but how do I do that?