I have this code in a BOI script (SO Header, PreWrite)...
... Set oPayment = oSession.AsObject(oBusObj.PaymentObj) retVal = oPayment.GetValue("CreditCardAuthorizationNo$", sAuthNo) retVal = oPayment.GetValue("AuthorizationDate$", sAuthDate) retVal = oSession.AsObject(oSession.UI).MessageBox("","CreditCardAuthorizationNo " & sAuthNo & " sAuthDate " & sAuthDate)
But it is coming up blank.
Yet I have a button script on the panel with the exact same script code, and it works?!?
Is there something I can do in a BOI script to reliably get access to the CC payment data for an SO?
I tried adding these lines, but nothing seems to help.
retVal = oBusObj.ReadAdditional("PaymentType")
retVal = oBusObj.ReadAdditional("PaymentTypeCategory")
retVal = oBusObj.ReadAdditional("PaymentObj")
(Big picture of the script is to check for a valid PreAuth on an SO for customers with certain Terms... so I need reliable access to payment data to check the Auth #, amount and date).