///<summary>Shows a message box on error.</summary> public static PayConnectService.transResponse ProcessCreditCard(PayConnectService.creditCardRequest request) { try{ Program prog=Programs.GetCur(ProgramName.PayConnect); PayConnectService.Credentials cred=GetCredentials(prog); PayConnectService.MerchantService ms=new OpenDental.PayConnectService.MerchantService(); PayConnectService.transResponse response=ms.processCreditCard(cred,request); ms.Dispose(); if(response.Status.code!=0){//Error MessageBox.Show(Lan.g("PayConnect","Payment failed")+". \r\n"+Lan.g("PayConnect","Error message from")+" Pay Connect: \""+response.Status.description+"\""); } return response; }catch(Exception ex){ MessageBox.Show(Lan.g("PayConnect","Payment failed")+". \r\n"+Lan.g("PayConnect","Error message from")+" Open Dental: \""+ex.Message+"\""); } return null; }
///<summary>Shows a message box on error.</summary> public static PayConnectService.transResponse ProcessCreditCard(PayConnectService.creditCardRequest request) { try{ Program prog = Programs.GetCur(ProgramName.PayConnect); PayConnectService.Credentials cred = GetCredentials(prog); PayConnectService.MerchantService ms = new OpenDental.PayConnectService.MerchantService(); PayConnectService.transResponse response = ms.processCreditCard(cred, request); ms.Dispose(); if (response.Status.code != 0) //Error { MessageBox.Show(Lan.g("PayConnect", "Payment failed") + ". " + response.Status.description); } return(response); }catch (Exception ex) { MessageBox.Show(Lan.g("PayConnect", "Payment failed") + ". " + ex.Message); } return(null); }