1 8 package lp.samples; 9 10 18 19 public class JLinkPointLPOrderPartSamples { 20 public static void main(String [] args) { 21 22 System.out.println("\nSAMPLE TRANSACTIONS using LPOrderPart object "); 23 24 CreditCardSales(); 26 PreAuth_PostAuth_Void(); 28 PeriodicBilling(); 30 VirtualCheck(); 32 33 System.out.println("\n**********************************************************"); 35 System.out.println("Sample TAX Calculation Transaction "); 36 System.out.println("**********************************************************"); 37 (new TAX()).process(); 38 System.out.println("\n**********************************************************"); 40 System.out.println("Sample SHIPPING Calculation Transaction "); 41 System.out.println("**********************************************************"); 42 (new SHIPPING()).process(); 43 44 45 } 46 47 public static void PreAuth_PostAuth_Void() 48 { 49 System.out.println("\n*****************************************************"); 50 System.out.println("Sample for PreAuth/PostAuth/Void Credit Card Transactions"); 51 System.out.println("******************************************************"); 52 System.out.println("\nFirst run PREAUTH"); 53 54 JLinkPointSample smpl = new PREAUTH(); 55 smpl.process(); 56 if( smpl.R_Error.length() != 0 ) {return;} 58 59 System.out.println("\nNow run POSTAUTH transaction using 'oid' recieved"); 62 System.out.println("from previous transaction. OID="+smpl.R_OrderNum); 63 64 smpl = new POSTAUTH(smpl.R_OrderNum); 65 smpl.process(); 66 if( smpl.R_Error.length() != 0 ) {return;} 68 System.out.println("\nNow VOID PreAuth/PostAuth using 'oid' "); 71 System.out.println("from previous transactions. OID="+smpl.R_OrderNum); 72 73 (new VOID(smpl.R_OrderNum)).process(); 74 75 } 76 77 public static void PeriodicBilling() 78 { 79 System.out.println("\n*****************************************************"); 80 System.out.println("Sample for Sample Periodic Billing Transactions"); 81 System.out.println("******************************************************"); 82 System.out.println("\nFirst create new Periodic Billing"); 83 84 JLinkPointSample smpl = new PB_NEW(); 85 smpl.process(); 86 if( smpl.R_Error.length() != 0 ) {return;} 88 89 System.out.println("\nNow modify existing Periodic Billing using 'oid' recieve"); 92 System.out.println("from previous transaction. OID="+smpl.R_OrderNum); 93 94 smpl = new PB_MODIFY(smpl.R_OrderNum); 95 smpl.process(); 96 if( smpl.R_Error.length() != 0 ) {return;} 98 System.out.println("\nNow cancel existing Periodic Billing using its 'oid' "); 101 System.out.println("OID="+smpl.R_OrderNum); 102 103 (new PB_CANCEL(smpl.R_OrderNum)).process(); 104 105 } 106 107 public static void VirtualCheck() 108 { 109 System.out.println("\n*****************************************************"); 110 System.out.println("Sample for Virtual Check Sale/Void Transactions"); 111 System.out.println("******************************************************"); 112 System.out.println("\nFirst run Sale"); 113 114 JLinkPointSample smpl = new VCHECK_SALE(); 115 smpl.process(); 116 if( smpl.R_Error.length() != 0 ) {return;} 118 119 System.out.println("\nNow VOID Virtual Check Sale using 'oid' "); 122 System.out.println("from previous transactions. OID="+smpl.R_OrderNum); 123 124 (new VCHECK_VOID(smpl.R_OrderNum)).process(); 125 126 } 127 128 public static void CreditCardSales() 129 { 130 131 System.out.println("\n*****************************************************"); 132 System.out.println("Credit Card SALE With Minimum Fields required for AVS"); 133 System.out.println("and Card Code fraud prevention measures "); 134 System.out.println("******************************************************"); 135 (new AVS_CVM()).process(); 136 137 System.out.println("\n*****************************************************"); 138 System.out.println("Minimum Required Fields for a FORCED TICKET Transaction"); 139 System.out.println("*****************************************************"); 140 (new FORCED_TICKET()).process(); 141 142 System.out.println("\n**********************************************************"); 143 System.out.println("An Example Level 2 Purchasing Card SALE "); 144 System.out.println("**********************************************************"); 145 (new L2PURCHASING_CARD()).process(); 146 147 System.out.println("\n**********************************************************"); 148 System.out.println("Minimum Required Fields for a Credit Card SALE"); 149 System.out.println( "**********************************************************"); 150 (new SALE_MININFO()).process(); 151 152 System.out.println("\n**********************************************************"); 153 System.out.println("An Example Credit Card SALE with all commonly used fields included"); 154 System.out.println("**********************************************************"); 155 (new SALE_MAXINFO()).process(); 156 157 System.out.println("\n**********************************************************"); 158 System.out.println("Required Fields for Credit Card SALE with ITEMS Transaction"); 159 System.out.println("**********************************************************"); 160 (new ITEMS_W_ESD()).process(); 161 162 System.out.println("\n**********************************************************"); 163 System.out.println("Sample of multiple Credit Card PreAuth Transactions"); 164 System.out.println("**********************************************************"); 165 (new MULTIPLE()).process(); 166 167 System.out.println("\n**********************************************************"); 168 System.out.println("Sample Retail Keyed Credit Card Transaction "); 169 System.out.println("**********************************************************"); 170 (new RETAIL_KEYED()).process(); 171 172 System.out.println("\n**********************************************************"); 173 System.out.println("Sample Retail Partial AVS Credit Card Transaction "); 174 System.out.println("**********************************************************"); 175 (new RETAIL_PARTIAL_AVS()).process(); 176 177 System.out.println("\n**********************************************************"); 178 System.out.println("Sample Retail Swipe Credit Card Transaction "); 179 System.out.println("**********************************************************"); 180 (new RETAIL_SWIPE()).process(); 181 182 } 183 } | Popular Tags |