diff --git a/AuthorizeNet.dll b/AuthorizeNet.dll new file mode 100644 index 0000000..a1f4826 Binary files /dev/null and b/AuthorizeNet.dll differ diff --git a/AuthorizeNet.xml b/AuthorizeNet.xml new file mode 100644 index 0000000..a19970d --- /dev/null +++ b/AuthorizeNet.xml @@ -0,0 +1,10297 @@ + + + + AuthorizeNet + + + + @return the baseUrl + + + @return the xmlBaseUrl + + + @return the cardPresentUrl + + + If a custom environment needs to be supported, this convenience create + method can be used to pass in a custom baseUrl. + + @param baseUrl + @param xmlBaseUrl + @return Environment object + + + If a custom environment needs to be supported, this convenience create + method can be used to pass in a custom baseUrl. + + @param baseUrl + @param xmlBaseUrl + @param cardPresentUrl + + @return Environment object + + + Reads a integer value from property file and/or the environment + Values in property file supersede the values set in environment + @param propertyName name of the integer property to read + @return int property value + + + Reads a boolean value from property file and/or the environment + Values in property file supersede the values set in environment + @param propertyName name of the boolean property to read + @return boolean property value + + + + Reads the value from property file and/or the environment + Values in property file supersede the values set in environmen + + propertyName name of the property to read + String property value + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Special case handlers + + validated on ????/??/?? for objects listed at the end + should be validated after each update of AnetApiSchema.cs + for fields/properties that are minOccurs="0" since xsd.exe + generates "specified" property for such fields and requires + special handling to set them seamlessly + Make sure to update the respective controllers to call the respective request hand + + + + + @author ramittal + + + + Since JAXB does not generate the class for this element, custom coding it + @author ramittal + + + + @author ramittal + + + + + This will issue a full HTML document with a built-in script, which will redirect the browser away from + Authorize.NET to the URL you pass in. Be sure the toURL is absolute. This can be used in your DPM Replay Response Endpoint + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Decides the response. + + The raw response. + + + + + A request that authorizes a transaction, no capture + + + + + Initializes a new instance of the class. + + The card number. + The expiration month and year. + The amount. + The description. + + + + Initializes a new instance of the class. + + The card number. + The expiration month and year. + The amount. + The description. + if set to true [include capture]. + + + + Loader for use with form POSTS from web + + + + + + A request representing a Capture - the final transfer of funds that happens after an auth. + + + + + Initializes a new instance of the class. + + The auth code. + The card number. + The expiration month and year. + The amount. + + + + Credits, or refunds, the amount back to the user + + + + + Initializes a new instance of the class. + + The transaction id. + The amount. + The card number. + + + + Creates an ECheck transaction (defaulted to WEB) request for use with the AIM gateway + + + The valid routing number of the customer’s bank + The customer’s valid bank account number + CHECKING, BUSINESSCHECKING, SAVINGS + The name of the bank that holds the customer’s account + The name associated with the bank account + The check number on the customer’s paper check + + + + Creates an ECheck transaction request for use with the AIM gateway + + The Echeck Transaction type: ARC, BOC, CCD, PPD, TEL, WEB + + The valid routing number of the customer’s bank + The customer’s valid bank account number + CHECKING, BUSINESSCHECKING, SAVINGS + The name of the bank that holds the customer’s account + The name associated with the bank account + The check number on the customer’s paper check + + + + Sets the eCheck request as a recurring payment + + + + + + Creates an ECheck transaction (defaulted to WEB) request for use with the AIM gateway + + + The valid routing number of the customer’s bank + The customer’s valid bank account number + CHECKING, BUSINESSCHECKING, SAVINGS + The name of the bank that holds the customer’s account + The name associated with the bank account + The check number on the customer’s paper check + + + + Creates an ECheck transaction request for use with the AIM gateway + + The Echeck Transaction type: ARC, BOC, CCD, PPD, TEL, WEB + + The valid routing number of the customer’s bank + The customer’s valid bank account number + CHECKING, BUSINESSCHECKING, SAVINGS + The name of the bank that holds the customer’s account + The name associated with the bank account + The check number on the customer’s paper check + + + + Creates an ECheck transaction (defaulted to WEB) request for use with the AIM gateway + + The auth code. + + The valid routing number of the customer’s bank + The customer’s valid bank account number + CHECKING, BUSINESSCHECKING, SAVINGS + The name of the bank that holds the customer’s account + The name associated with the bank account + The check number on the customer’s paper check + + + + Creates an ECheck transaction request for use with the AIM gateway + + The auth code. + The Echeck Transaction type: ARC, BOC, CCD, PPD, TEL, WEB + + The valid routing number of the customer’s bank + The customer’s valid bank account number + CHECKING, BUSINESSCHECKING, SAVINGS + The name of the bank that holds the customer’s account + The name associated with the bank account + The check number on the customer’s paper check + + + + Creates an ECheck transaction request for use with the AIM gateway + + + The transaction id. + + + + Creates an ECheck transaction request for use with the AIM gateway + + + The transaction id. + The customer’s valid bank account number + + + + Creates an ECheck transaction (defaulted to WEB) request for use with the AIM gateway + + + The valid routing number of the customer’s bank + The customer’s valid bank account number + CHECKING, BUSINESSCHECKING, SAVINGS + The name of the bank that holds the customer’s account + The name associated with the bank account + The check number on the customer’s paper check + + + + Creates an ECheck transaction request for use with the AIM gateway + + The Echeck Transaction type: ARC, BOC, CCD, PPD, TEL, WEB + + The valid routing number of the customer’s bank + The customer’s valid bank account number + CHECKING, BUSINESSCHECKING, SAVINGS + The name of the bank that holds the customer’s account + The name associated with the bank account + The check number on the customer’s paper check + + + + Creates an ECheck transaction request for use with the AIM gateway + + The transaction id. + + + + The type of API Request being performed + + + + + Credit Card authorization + + + + + Settlement of a previously authorized transaction + + + + + An authorization and capture all in one + + + + + A Credit + + + + + Voiding of a previously authorized transaction + + + + + Capturing of a prior authorization + + + + + Issue a credit for a transaction not based with the API + + + + + The type of BankAccount to be used + + + + + Checking Account + + + + + Business Checking account + + + + + Savings Account + + + + + The type of eCheck transaction + + + + + Accounts Receivable Conversion + + + + + Back Office Conversion + + + + + Cash Concentration or Disbursement + + + + + Prearranged Payment and Deposit Entry + + + + + Telephone-Initiated Entry + + + + + Internet-Initiated Entry + + + + + An abstract base class, from which all Request classes must inherit + + + + + Initializes a new instance of the class. + + + + + Outputs the queue as a delimited, URL-safe string for sending to Authorize.net as a form POST + + + + + Queues the specified key into the request. + + The key. + The value. + + + + Gets the specified key from the request. + + The key. + + + + Loads the core values tp the API request, including auth and basic settings. + + + + + Adds a Customer record to the current request + + + + + This method adds the required values for Fraud Detection Suite. Your merchant must sign up for this service with Authorize.Net + + The Customer's IP address + + + + + This method will pull the user's IP address for use with FDS. Only valid for Web-based transactions. + + + + + + Adds a detailed tax value to the request + + + + + Adds a tax value to the request + + + + + Adds a detailed tax value to the request + + + + + Adds a tax value to the request + + + + + Adds a detailed tax value to the request + + + + + Adds a tax value to the request + + + + + The 3-digit Credit Card Code (CCV) on the back of the card + + + + + Adds a Shipping Record to the current request + + + + + This is where you can add custom values to the request, which will be returned to you + in the response + + + + + Adds a line item to the current order + + + + + + Adds an InvoiceNumber to the request + + + + + Gets or sets the bank ABA code. + + The bank ABA code. + + + + Gets or sets the bank account number. + + The bank account number. + + + + Gets or sets the type of the bank account. + + The type of the bank account. + + + + Gets or sets the name of the bank. + + The name of the bank. + + + + Gets or sets the name of the bank account. + + The name of the bank account. + + + + Gets or sets the type of the echeck. + + The type of the echeck. + + + + Gets or sets the bank check number. + + The bank check number. + + + + Gets or sets the address. + + The address. + + + + Gets or sets the allow partial auth. + + The allow partial auth. + + + + Gets or sets the amount. + + The amount. + + + + Gets or sets the auth code. + + The auth code. + + + + Gets or sets the authentication indicator. + + The authentication indicator. + + + + Gets or sets the credit card code. + + The card code. + + + + Gets or sets the credit card number. + + The card num. + + + + Gets or sets the cardholder authentication value. + + The cardholder authentication value. + + + + Gets or sets the city. + + The city. + + + + Gets or sets the company. + + The company. + + + + Gets or sets the country. + + The country. + + + + Gets or sets the cust id. + + The cust id. + + + + Gets or sets the customer ip. + + The customer ip. + + + + Gets or sets the delim char. + + The delim char. + + + + Gets or sets the delim data. + + The delim data. + + + + Gets or sets the description. + + The description. + + + + Gets or sets the duplicate window - the am. + + The duplicate window. + + + + Gets or sets the duty. + + The duty. + + + + Gets or sets the email. + + The email. + + + + Gets or sets the value indicating that the customer get an email receipt. This should be true or false, yes or no. + + The email customer. + + + + Gets or sets the merchant email. + + The email address to which to send the merchant email receipt. + + + + Gets or sets the encap char. + + The encap char. + + + + Gets or sets the exp date. + + The exp date. + + + + Gets or sets the fax. + + The fax. + + + + Gets or sets the first name. + + The first name. + + + + Gets or sets the footer email receipt. + + The footer email receipt. + + + + Gets or sets the freight. + + The freight. + + + + Gets or sets the header email receipt. + + The header email receipt. + + + + Gets or sets the invoice num. + + The invoice num. + + + + Gets or sets the last name. + + The last name. + + + + Gets or sets the line item. + + The line item. + + + + Gets or sets the login. + + The login. + + + + Gets or sets the method. + + The method. + + + + Gets or sets the phone. + + The phone. + + + + Gets or sets the po number. + + The po num. + + + + Gets or sets the recurring billing. + + The recurring billing. + + + + Gets or sets the relay response. + + The relay response. + + + + Gets or sets the ship to address. + + The ship to address. + + + + Gets or sets the ship to company. + + The ship to company. + + + + Gets or sets the ship to country. + + The ship to country. + + + + Gets or sets the ship to city. + + The ship to city. + + + + Gets or sets the first name of the ship to. + + The first name of the ship to. + + + + Gets or sets the last name of the ship to. + + The last name of the ship to. + + + + Gets or sets the state of the ship to. + + The state of the ship to. + + + + Gets or sets the ship to zip. + + The ship to zip. + + + + Gets or sets the split tender id. + + The split tender id. + + + + Gets or sets the state. + + The state. + + + + Gets or sets the tax. + + The tax. + + + + Gets or sets the tax exempt. + + The tax exempt. + + + + Gets or sets the test request. + + The test request. + + + + Gets or sets the tran key. + + The tran key. + + + + Gets or sets the trans id. + + The trans id. + + + + Gets or sets the type. + + The type. + + + + Gets or sets the version. + + The version. + + + + Gets or sets the zip. + + The zip. + + + + Gets or sets the solution id. + + The solution id. + + + + A request representing a PriorAuthCapture - the final transfer of funds that happens after an auth. + + + + + Initializes a new instance of the class. + + The amount. + The transaction id. + + + + A request representing a Void of a previously authorized transaction + + + + + Initializes a new instance of the class. + + The transaction id. + + + + Validates that what was passed by Auth.net is valid + + + + + Initializes a new instance of the class. + + The API login. + The transaction key. + The mode. + + + + Initializes a new instance of the class. + + The API login. + The transaction key. + + + + Creates a new subscription + + The subscription to create - requires that you add a credit card and billing first and last. + + + + Updates the subscription. + + The subscription to update. Can't change billing intervals however. + + + + + Cancels the subscription. + + The subscription ID. + + + + + Gets the subscription status. + + The subscription ID. + + + + + This is the abstracted SubscriptionRequest class - it provides a simplified way of dealing with the underlying + ARB API. This class uses a Fluent Interface to build out the request - creating only what you need. + + + + + Creates a monthly subscription request. + + The email. + Name of the subscription. + The amount. + The number of billings. So if you wanted to create a monthly subscription that lasts for a year - this would be 12 + + + + + Returns a new subscription request. + + SubscriptionRequest object. + + + + Creates an annual subscription. + + The email. + Name of the subscription. + The amount. + The number of billings. So if you wanted to create a yearly subscription that lasts for a year - this would be 1 + + + + + Creates a weekly subscription that bills every 7 days. + + The email. + Name of the subscription. + The amount. + + + + + Creates a weekly subscription that bills every 7 days. + + The email. + Name of the subscription. + The amount. + The number of billings. If you want this subscription to last for a month, this should be set to 4 + + + + + Adds a credit card payment to the subscription. This is required. + + The first name. + The last name. + The card number. + The card expiration year. + The card expiration month. + + + + + Adds a full billing address - which is required for a credit card. + + The add. + + + + + Adds a shipping address to the request. + + The address to ship to + + + + + Sets a trial period for the subscription. This is part of the overall subscription plan. + + The trial billing cycles. + The trial amount. + + + + + This is mostly for internal processing needs - it takes the SubscriptionRequest and turns it into something the Gateway can serialize. + + + + + + The Update function won't accept a change to some values - specifically the billing interval. This creates a request + that the API can understand for updates only + + + + + + This is an Address abstraction used for Billing and Shipping + + + + + Initializes a new instance of the class, resolving the given API Type + + From type. + + + + Initializes a new instance of the class, resolving the given API Type + + From type. + + + + Initializes a new instance of the class, resolving the given API Type + + From type. + + + + Creates an API type for use with outbound requests to the Gateway. Mostly for internal use. + + + + + + Creates an API type for use with outbound requests to the Gateway. Mostly for internal use. + + + + + + Creates an API type for use with outbound requests to the Gateway. Mostly for internal use. + + + + + + This is an abstraction for use with the CIM API. It's a partial class so you can combine it with your class as needed. + + + + + Initializes a new instance of the class. + + The API login. + The transaction key. + Test or Live. + None, Test, or Live. + + + + Initializes a new instance of the class. + + The API login. + The transaction key. + + + + Retrieve an existing customer profile along with all the associated customer payment profiles and customer shipping addresses. + + The profile ID + + + + + Adds a credit card profile to the user and returns the profile ID + + The profile ID. + The card number. + The expiration month. + The expiration year. + The card code. + + + + + Adds a credit card profile to the user and returns the profile ID + + The profile ID. + The card number. + The expiration month. + The expiration year. + + + + + Adds a credit card profile to the user and returns the profile ID + + + + + + Adds a eCheck bank account profile to the user and returns the profile ID + + + + + + Adds a bank account profile to the user and returns the profile ID + + + + + + Adds a bank account profile to the user and returns the profile ID + + + + + + Adds a Shipping Address to the customer profile + + + + + Adds a Shipping Address to the customer profile + + + + + Authorizes and Captures a transaction using the supplied profile information. + + The profile ID. + The payment profile ID. + The amount. + + + + + Authorizes and Captures a transaction using the supplied profile information with Tax and Shipping specified. If you want + to add more detail here, use the 3rd option - which is to add an Order object + + The profile ID. + The payment profile ID. + The amount. + The tax. + The shipping. + + + + + Authorizes and Captures a transaction using the supplied profile information, abstracted through an Order object. Using the Order + you can add line items, specify shipping and tax, etc. + + The order. + + + + + Authorizes a transaction using the supplied profile information. + + The profile ID. + The payment profile ID. + The amount. + + + + + Authorizes a transaction using the supplied profile information with Tax and Shipping specified. If you want + to add more detail here, use the 3rd option - which is to add an Order object + + The profile ID. + The payment profile ID. + The amount. + The tax. + The shipping. + + + + + Authorizes a transaction using the supplied profile information, abstracted through an Order object. Using the Order + you can add line items, specify shipping and tax, etc. + + The order. + A string representing the approval code + + + + Captures the specified transaction. + + The profile ID. + The payment profile id. + The 3 or 4 digit card code in the signature space. + The amount. + The approval code. + + + + + Captures the specified transaction. + + The profile ID. + The payment profile id. + The id of the shipping information to use for the transaction. + The transaction id to mark to capture (settle). + The decimal amount to capture. + + + + + Captures the specified transaction. + + The profile ID. + The payment profile id. + The transaction id to mark to capture (settle). + The decimal amount to capture. + + + + + Captures the specified transaction. + + The transaction id to mark to capture (settle). + The amount. + + + + + Refunds a transaction for the specified amount + + The profile ID. + The payment profile id. + The transaction id. + The approval code. + The amount. + + + + + Refunds a transaction for the specified amount + + The profile ID. + The payment profile id. + The transaction id. + The amount. + + + + + Voids a previously authorized transaction + + The profile ID. + The payment profile id. + The transaction id. + The approval code. + + + + + Voids a previously authorized transaction + + The profile ID. + The payment profile id. + The transaction id. + + + + + Deletes a customer from the AuthNET servers. + + The profile ID. + + + + + Deletes a payment profile for a customer from the AuthNET servers. + + The profile ID. + The payment profile ID. + + + + + Deletes a shipping address for a given user from the AuthNET servers. + + The profile ID. + The shipping address ID. + + + + + Returns all Customer IDs stored at Authorize.NET + + + + + + Gets a shipping address for a customer. + + The profile ID. + The shipping address ID. + + + + + Updates a customer's record. + + The customer. + + + + + Updates a payment profile for a user. + + The profile ID. + The profile. + + + + + Updates a shipping address for a user. + + The profile ID. + The address. + + + + + Overload method ommitting shippingAddressID. + + The profile ID. + The payment profile ID. + The mode. + + + + + Overload method ommitting shippingAddressID & ValidationMode enum so will use the value passed into the constructor. + + The profile ID. + The payment profile ID. + + + + + Overload method ommitting ValidationMode enum so will use the value passed into the constructor. + + The profile ID. + The payment profile ID. + The shipping address ID. + + + + + This function validates the information on a profile - making sure what you have stored at AuthNET is valid. You can + do this in two ways: in TestMode it will just run a validation to be sure all required fields are present and valid. If + you specify "live" - a live authorization request will be performed. + + The profile ID. + The payment profile ID. + The shipping address ID. + The mode. + + + + + This is an abstraction for the AuthNET API so you can specify detailed order information. + + + + + Initializes a new instance of the class. + + The profile ID. + The payment profile id. + The shipping address ID. + + + + For the Information in name/value pair format that does not exist within CIM. + Example: x_customer_ip=100.0.0.1&x_cust_id=Testing Extra Options + + + + + An abstraction for the AuthNET API, allowing you store credit card information with Authorize.net + + + + + Creates an API object, ready to send to AuthNET servers. + + + + + + Initializes a new instance of the class, using the passed-in API type to create the profile. + + Type of the API. + + + + Initializes a new instance of the class. + + The amount. + The card number. + The expiration month. + The expiration year. + + + + Initializes a new instance of the class using track data from a card reader. + + The amount. + The track1 data. + The track2 data. + + + + Initializes a new instance of the class. + + The amount. + The card number. + The expiration month. + The expiration year. + + + + Capture only function + + + + + Initializes a new instance of the class. + + The auth code. + The card number. + The expiration month and year. + The amount. + + + + A Credit transaction + + + + + Initializes a new instance of the class. + + The transaction ID. + + + + The devise which read in the Credit Card + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The gateway which runs the credit card transaction + + + + + Initializes a new instance of the class. + + The API login. + The transaction key. + if set to true [is test]. + + + + Initializes a new instance of the class. + + The API login. + The transaction key. + Type of the market. + Type of the device. + if set to true [is test]. + + + + Sends the specified request. + + The request. + The description. + + + + + Captures a prior authorization + + + + + Initializes a new instance of the class. + + The transaction ID. + The amount. + + + + Parses the response from the transaction (a piped string) into a representational class + + + + + Initializes a new instance of the class. + + The raw response. + + + + Gets the user reference. + + The user reference. + + + + Gets the MD5 hash. + + The MD5 hash. + + + + Gets the split tender ID. + + The split tender ID. + + + + Gets the remaining balance on card. + + The remaining balance on card. + + + + Gets the requested amount. + + The requested amount. + + + + Gets the AVS response. + + The AVS response. + + + + Gets the card code response. + + The card code response. + + + + Gets the amount. + + The amount. + + + + Gets a value indicating whether this is approved. + + true if approved; otherwise, false. + + + + Gets the authorization code. + + The authorization code. + + + + Gets the invoice number. + + The invoice number. + + + + Gets the card number. + + The card number. + + + + Gets the response code. + + The response code. + + + + Gets the response reason code. + + The response reason code. + + + + Gets the message. + + The message. + + + + Gets the transaction ID. + + The transaction ID. + + + + Gets the value by index + + position of the response to be returned + Returns index value. + + + + A Cardpresent Void transaction + + + + + Initializes a new instance of the class. + + The transaction ID. + + + + A class that builds out a DPM-ready form for submission to Auth.net. + + + + + A helper class for representing a charge + + + + + Creates a List of Charges from the Statistics return from the batch. + + The stats. + + + + + Gets or sets the type of the card. + + The type of the card. + + + + Gets or sets the amount. + + The amount. + + + + Gets or sets the charge back amount. + + The charge back amount. + + + + Gets or sets the charge back count. + + The charge back count. + + + + Gets or sets the returned items count. + + The returned items count. + + + + Gets or sets the returned items amount. + + The returned items amount. + + + + Gets or sets the correction notice count. + + The correction notice count. + + + + Gets or sets the decline count. + + The decline count. + + + + Gets or sets the refund amount. + + The refund amount. + + + + Gets or sets the void count. + + The void count. + + + + A class representing a batch-settlement + + + + + Creates a new batch from a stats response + + + + + Creates a list of batches directly from the API Response + + The batches. + + + + + Gets or sets the charges. + + The charges. + + + + Gets or sets the ID. + + The ID. + + + + Gets or sets the settled on. + + The settled on. + + + + Gets or sets the state. + + The state. + + + + Gets or sets the payment method. + + The payment method. + + + + Gets or Sets the MarketType + + MarketType + + + + Gets or Sets the Product + + Product + + + + The gateway for requesting Reports from Authorize.Net + + + + + Initializes a new instance of the class. + + The API login. + The transaction key. + Test or Live. + + + + Initializes a new instance of the class. + + The API login. + The transaction key. + + + + Returns all Settled Batches for the last 30 days + + + + + returns the most recent 1000 transactions that are unsettled + + + + + + Returns all Settled Batches for the last 30 days + + + + + Returns batch settlements for the specified date range + + + + + Returns charges and statistics for a given batch + + the batch id + a batch with statistics + + + + Returns batch settlements for the specified date range + + + + + Returns all transaction within a particular batch + + + + + Returns Transaction details for a given transaction ID (transid) + + + + + + Returns all transactions for the last 30 days + + + + + + Returns all transactions for a given time period. This can result in a number of calls to the API + + + + + The status for the transaction + + + + + Approved + + + + + Declined + + + + + Error + + + + + HeldForReview + + + + + Representational class for a transactional line item + + + + + Gets or sets the ID. + + The ID. + + + + Gets or sets the name. + + The name. + + + + Gets or sets the description. + + The description. + + + + Gets or sets the quantity. + + The quantity. + + + + Gets or sets the unit price. + + The unit price. + + + + Gets or sets a value indicating whether this is taxable. + + true if taxable; otherwise, false. + + + + A representational class for a Transaction + + + + + Initializes a new instance of the class. + + + + + Creates a list of Transactions directly from the API Response. + + The transactions. + + + + + Creates a Transaction directly from the API Response + + The trans. + + + + + Creates a Transaction directly from the API Response + + The trans. + + + + + Gets or sets the transaction ID. + + The transaction ID. + + + + + + Gets or sets the type of the transaction. + + The type of the transaction. + + + + Gets or sets the response code. + + The response code. + + + + Gets or sets the response reason. + + The response reason. + + + + Gets or sets the description. + + The description. + + + + Gets or sets the authorization code. + + The authorization code. + + + + Gets or sets the fraud filters. + + The fraud filters. + + + + Gets the line items. + + The line items. + + + + Gets or sets the CAVV code. + + The CAVV code. + + + + Gets or sets the status. + + The status. + + + + Gets or sets the last name. + + The last name. + + + + Gets or sets the first name. + + The first name. + + + + Gets or sets the invoice number. + + The invoice number. + + + + Gets or sets the order description. + + The order description. + + + + Gets or sets the PO number. + + The PO number. + + + + Gets or sets the requested amount. + + The requested amount. + + + + Gets or sets the authorization amount. + + The authorization amount. + + + + Gets or sets the settle amount. + + The settle amount. + + + + Gets or sets the tax. + + The tax. + + + + Gets or sets the tax description. + + The tax description. + + + + Gets or sets the shipping. + + The shipping. + + + + Gets or sets the shipping description. + + The shipping description. + + + + Gets or sets the duty. + + The duty. + + + + Gets or sets the duty description. + + The duty description. + + + + Gets or sets the batch settlement ID. + + The batch settlement ID. + + + + Gets or sets the batch settled on. + + The batch settled on. + + + + Gets or sets the state of the batch settlement. + + The state of the batch settlement. + + + + Gets or sets a value indicating whether [tax exempt]. + + true if [tax exempt]; otherwise, false. + + + + Gets or sets the card number. + + The card number. + + + + Gets or sets the card expiration. + + The card expiration. + + + + Gets or sets the type of the card. + + The type of the card. + + + + Gets or sets eCheckBankAccount. + + eCheckBankAccount + + + + Gets or sets the customer ID. + + The customer ID. + + + + Gets or sets the customer email. + + The customer email. + + + + Gets or sets the billing address. + + The billing address. + + + + Gets or sets the shipping address. + + The shipping address. + + + + Gets or sets a value indicating whether this instance is recurring. + + + true if this instance is recurring; otherwise, false. + + + + + Gets the CAVV response. + + The CAVV response. + + + + Gets or sets the card response code. + + The card response code. + + + + Gets the card response. + + The card response. + + + + Gets or sets the AVS code. + + The AVS code. + + + + Gets the AVS response. + + The AVS response. + + + + Gets or Sets the MarketType + + MarketType + + + + Gets or Sets the Product + + Product + + + + Gets or Sets the MobileDeviceID + + MobileDeviceID + + + + Gets or Sets the SubscriptionPayment + + SubscriptionPayment + + + + Gets or Sets the HasReturnedItems + True - has eCheck returned items. use GetTransactionDetails to get detailed information on returned items + False - has no eCheck returned items. + Null - eCheck returned items information is not returned. + + HasReturnedItems + + + + Gets or Sets the ReturnedItems + + ReturnedItems + + + + Gets or Sets the Solution + + Solution + + + + A class that builds out a SIM-ready form for submission to Auth.net. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + These are field names and explanations only + + + + + The merchant's unique API Login ID + + + + + The merchant's unique Transaction Key + + + + + True, False + + + + + Whether to return the data in delimited fashion + + + + + If the return from AuthorizeNet is delimited - this is the character to use. Default is pipe + + + + + The relay response - leave this set as TRUE + + + + + The solution ID of your product or integration used for better reporting + + + + + Required - The merchant's transaction version + + + + + The type of transaction: + AUTH_CAPTURE (default), AUTH_ONLY, CAPTURE_ONLY, CREDIT, PRIOR_AUTH_CAPTURE, VOID + + + + + CC or ECHECK + + + + + The recurring billing status + + + + + The amount of the transaction + + + + + The credit card number - between 13 and 16 digits without spaces. When x_type=CREDIT, only the last four digits are required + + + + + The expiration date - MMYY, MM/YY, MM-YY, MMYYYY, MM/YYYY, MM-YYYY + + + + + The three- or four-digit number on the back of a credit card (on the front for American Express). + + + + + The credit card type or echeck in the case of echeck transactions. + + + + + The payment gateway assigned transaction ID of an original transaction - Required only for CREDIT, PRIOR_ AUTH_ CAPTURE, and VOID transactions + + + + + The payment gateway-assitned ID assigned when the original transaction includes two or more partial payments. This is the identifier that is used to group transactions that are part of a split tender order. + + + + + The authorization code of an original transaction not authorized on the payment gateway + + + + + The request to process test transactions + + + + + The window of time after the submission of a transaction that a duplicate transaction can not be submitted + + + + + The merchant assigned invoice number for the transaction + + + + + The transaction description + + + + + The ID of the Customer as relates to your application + + + + + NullableBooleanEnum + + + + + Generates the HMAC-encrypted hash to send along with the SIM form + + The merchant's transaction key + The merchant's Authorize.NET API Login + The amount of the transaction + The sequence + The timeStamp + string + + + + + Encrypts the key/value pair supplied using HMAC-MD5 + + key + value + + + + + Generates a 4-place sequence number randomly + + + + + + Generates a timestamp in seconds from 1970 + + + + + Source Code from MSDN article http://msdn.microsoft.com/en-us/magazine/cc163367.aspx + + + + + This class posts the XML Form to Authorize.NET + + + + + Initializes a new instance of the class. + + The mode. + The API login. + The transaction key. + + + + Adds authentication information to the request. + + The request. + + + + Sends the specified API request. + + The API request. + + + + diff --git a/CustomerProfiles/CreateCustomerProfile.cs b/CustomerProfiles/CreateCustomerProfile.cs index fa7cc8f..9c69da4 100644 --- a/CustomerProfiles/CreateCustomerProfile.cs +++ b/CustomerProfiles/CreateCustomerProfile.cs @@ -26,7 +26,7 @@ public static ANetApiResponse Run(string ApiLoginID, string ApiTransactionKey, s var creditCard = new creditCardType { cardNumber = "4111111111111111", - expirationDate = "0725" + expirationDate = "1028" }; var bankAccount = new bankAccountType @@ -120,4 +120,4 @@ public static ANetApiResponse Run(string ApiLoginID, string ApiTransactionKey, s return response; } } -} \ No newline at end of file +} diff --git a/CustomerProfiles/GetCustomerProfile.cs b/CustomerProfiles/GetCustomerProfile.cs index 496fc10..4faf040 100644 --- a/CustomerProfiles/GetCustomerProfile.cs +++ b/CustomerProfiles/GetCustomerProfile.cs @@ -25,12 +25,12 @@ public static ANetApiResponse Run(String ApiLoginID, String ApiTransactionKey, s Item = ApiTransactionKey, }; - var request = new getCustomerProfileRequest(); + var request = new getCustomerProfileRequest(); request.customerProfileId = customerProfileId; // instantiate the controller that will call the service var controller = new getCustomerProfileController(request); - controller.Execute(); + controller.Execute(); // get the response from the service (errors contained if any) var response = controller.GetApiResponse(); diff --git a/CustomerProfiles/UpdateCustomerPaymentProfile.cs b/CustomerProfiles/UpdateCustomerPaymentProfile.cs index a893109..5d0fbc7 100644 --- a/CustomerProfiles/UpdateCustomerPaymentProfile.cs +++ b/CustomerProfiles/UpdateCustomerPaymentProfile.cs @@ -27,7 +27,7 @@ public static ANetApiResponse Run(String ApiLoginID, String ApiTransactionKey, s var creditCard = new creditCardType { cardNumber = "4111111111111111", - expirationDate = "0725" + expirationDate = "1028" }; //=========================================================================== diff --git a/CustomerProfiles/UpdateCustomerShippingAddress.cs b/CustomerProfiles/UpdateCustomerShippingAddress.cs index ff34ac0..ce81475 100644 --- a/CustomerProfiles/UpdateCustomerShippingAddress.cs +++ b/CustomerProfiles/UpdateCustomerShippingAddress.cs @@ -27,7 +27,7 @@ public static ANetApiResponse Run(String ApiLoginID, String ApiTransactionKey, s var creditCard = new creditCardType { cardNumber = "4111111111111111", - expirationDate = "0725" + expirationDate = "1028" }; var paymentType = new paymentType { Item = creditCard }; diff --git a/DotnetCoreArtifacts/AuthorizeNET.dll b/DotnetCoreArtifacts/AuthorizeNET.dll new file mode 100644 index 0000000..4cf8670 Binary files /dev/null and b/DotnetCoreArtifacts/AuthorizeNET.dll differ diff --git a/DotnetCoreArtifacts/AuthorizeNET.xml b/DotnetCoreArtifacts/AuthorizeNET.xml new file mode 100644 index 0000000..346f3fd --- /dev/null +++ b/DotnetCoreArtifacts/AuthorizeNET.xml @@ -0,0 +1,3967 @@ + + + + AuthorizeNET + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Special case handlers + + validated on ????/??/?? for objects listed at the end + should be validated after each update of AnetApiSchema.cs + for fields/properties that are minOccurs="0" since xsd.exe + generates "specified" property for such fields and requires + special handling to set them seamlessly + Make sure to update the respective controllers to call the respective request hand + + + + + Since JAXB does not generate the class for this element, custom coding it + @author ramittal + + + + @author ramittal + + + + + Gets the base url + + + + + Gets the xml base url + + + + + Gets the card present url + + + + + Create a custom environment with the specified base url + + Base url + Xml base url + The custom environment + + + + Create a custom environment with the specified base url + + Base url + Xml base url + Card present url + The custom environment + + + + Reads an integer value from the environment + + Name of the int property to read + Integer property value + + + + Reads a boolean value from the environment + + Name of the boolean property to read + Boolean property value + + + + Reads the value from the environment + + Name of the property to read + String property value + + + + Source Code from MSDN article http://msdn.microsoft.com/en-us/magazine/cc163367.aspx + + + + diff --git a/FraudManagement/ApproveOrDeclineHeldTransaction.cs b/FraudManagement/ApproveOrDeclineHeldTransaction.cs index a4b1432..d9bccaa 100644 --- a/FraudManagement/ApproveOrDeclineHeldTransaction.cs +++ b/FraudManagement/ApproveOrDeclineHeldTransaction.cs @@ -29,7 +29,7 @@ public static ANetApiResponse Run(String ApiLoginID, String ApiTransactionKey) request.heldTransactionRequest = new heldTransactionRequestType { action = afdsTransactionEnum.approve, - refTransId = "60012192922" + refTransId = "60108066607" }; // instantiate the controller that will call the service diff --git a/PaymentTransactions/AuthorizeCreditCard.cs b/PaymentTransactions/AuthorizeCreditCard.cs index e0c9f20..4420171 100644 --- a/PaymentTransactions/AuthorizeCreditCard.cs +++ b/PaymentTransactions/AuthorizeCreditCard.cs @@ -27,7 +27,7 @@ public static ANetApiResponse Run(String ApiLoginID, String ApiTransactionKey, d var creditCard = new creditCardType { cardNumber = "4111111111111111", - expirationDate = "0725" + expirationDate = "1028" }; //standard api call to retrieve response diff --git a/PaymentTransactions/CaptureFundsAuthorizedThroughAnotherChannel.cs b/PaymentTransactions/CaptureFundsAuthorizedThroughAnotherChannel.cs index 19d3758..b2be7fb 100644 --- a/PaymentTransactions/CaptureFundsAuthorizedThroughAnotherChannel.cs +++ b/PaymentTransactions/CaptureFundsAuthorizedThroughAnotherChannel.cs @@ -29,7 +29,7 @@ public static ANetApiResponse Run(String ApiLoginID, String ApiTransactionKey, d { // Change the cardNumber and expiration Date as required cardNumber = "4111111111111111", - expirationDate = "0725" + expirationDate = "1028" }; //standard api call to retrieve response diff --git a/PaymentTransactions/ChargeCreditCard.cs b/PaymentTransactions/ChargeCreditCard.cs index 739969b..7132d48 100644 --- a/PaymentTransactions/ChargeCreditCard.cs +++ b/PaymentTransactions/ChargeCreditCard.cs @@ -28,7 +28,7 @@ public static ANetApiResponse Run(String ApiLoginID, String ApiTransactionKey, d var creditCard = new creditCardType { cardNumber = "4111111111111111", - expirationDate = "0725", + expirationDate = "1028", cardCode = "123" }; diff --git a/PaymentTransactions/ChargeTokenizedCreditCard.cs b/PaymentTransactions/ChargeTokenizedCreditCard.cs index c9c6fc7..b7a8c2a 100644 --- a/PaymentTransactions/ChargeTokenizedCreditCard.cs +++ b/PaymentTransactions/ChargeTokenizedCreditCard.cs @@ -28,7 +28,7 @@ public static ANetApiResponse Run(String ApiLoginID, String ApiTransactionKey) var creditCard = new creditCardType { cardNumber = "4111111111111111", - expirationDate = "0725", + expirationDate = "1028", // Set the token specific info isPaymentToken = true, cryptogram = "EjRWeJASNFZ4kBI0VniQEjRWeJA=" // Set this to the value of the cryptogram received from the token provide diff --git a/PaymentTransactions/DebitBankAccount.cs b/PaymentTransactions/DebitBankAccount.cs index d9707bf..f2417c3 100644 --- a/PaymentTransactions/DebitBankAccount.cs +++ b/PaymentTransactions/DebitBankAccount.cs @@ -37,7 +37,6 @@ public static ANetApiResponse Run(String ApiLoginID, String ApiTransactionKey, d bankName = "Wells Fargo Bank NA", // checkNumber = "101" // needed if echeckType is "ARC" or "BOC" }; - // standard api call to retrieve response var paymentType = new paymentType { Item = bankAccount }; diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index ba83490..2bac29a 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -6,7 +6,7 @@ // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("SampleCode")] -[assembly: AssemblyDescription("")] +[assembly: AssemblyDescription("0.9.0.0")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Microsoft")] [assembly: AssemblyProduct("SampleCode")] @@ -32,5 +32,6 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("0.9.0.0")] +[assembly: AssemblyFileVersion("0.9.0.0")] + diff --git a/RecurringBilling/CreateSubscription.cs b/RecurringBilling/CreateSubscription.cs index ec63c3b..1148d0e 100644 --- a/RecurringBilling/CreateSubscription.cs +++ b/RecurringBilling/CreateSubscription.cs @@ -40,7 +40,7 @@ public static ANetApiResponse Run(String ApiLoginID, String ApiTransactionKey, s var creditCard = new creditCardType { cardNumber = "4111111111111111", - expirationDate = "0725" + expirationDate = "1028" }; //standard api call to retrieve response diff --git a/RecurringBilling/CreateSubscriptionFromCustomerProfile.cs b/RecurringBilling/CreateSubscriptionFromCustomerProfile.cs index bd2fa57..f4af347 100644 --- a/RecurringBilling/CreateSubscriptionFromCustomerProfile.cs +++ b/RecurringBilling/CreateSubscriptionFromCustomerProfile.cs @@ -41,7 +41,7 @@ public static ANetApiResponse Run(String ApiLoginID, String ApiTransactionKey, s var creditCard = new creditCardType { cardNumber = "4111111111111111", - expirationDate = "0725" + expirationDate = "1028" }; //standard api call to retrieve response diff --git a/RecurringBilling/UpdateSubscription.cs b/RecurringBilling/UpdateSubscription.cs index 680cf0a..b679359 100644 --- a/RecurringBilling/UpdateSubscription.cs +++ b/RecurringBilling/UpdateSubscription.cs @@ -32,7 +32,7 @@ public static ANetApiResponse Run(string ApiLoginID, string ApiTransactionKey, s var creditCard = new creditCardType { cardNumber = "4111111111111111", - expirationDate = "0725" + expirationDate = "1028" }; //standard api call to retrieve response diff --git a/SampleCode.cs b/SampleCode.cs index db546ce..d401d9b 100644 --- a/SampleCode.cs +++ b/SampleCode.cs @@ -2,6 +2,11 @@ using net.authorize.sample.PaymentTransactions; using System; using net.authorize.sample.CustomerProfiles; +using AuthorizeNet.Api.Controllers.Bases; +using AuthorizeNet.Api.Contracts.V1; +#if NETCOREAPP2_0 +using AuthorizeNet.Utilities; +#endif namespace net.authorize.sample { @@ -34,7 +39,7 @@ static void Main(string[] args) Console.WriteLine(""); Console.Write("Press to finish ..."); Console.ReadLine(); - + } private static void ShowUsage() @@ -61,7 +66,7 @@ private static void SelectMethod() private static void ShowMethods() { - + Console.WriteLine(" ChargeCreditCard"); Console.WriteLine(" AuthorizeCreditCard"); Console.WriteLine(" CapturePreviouslyAuthorizedAmount"); @@ -126,6 +131,7 @@ private static void ShowMethods() Console.WriteLine(" GetMerchantDetails"); Console.WriteLine(" GetAnAcceptPaymentPage"); Console.WriteLine(" GetCustomerProfileTransactionList"); + Console.WriteLine(" CreateAnAcceptPaymentTransaction"); Console.WriteLine(" GetAccountUpdaterJobSummary"); } @@ -142,14 +148,34 @@ private static void RunMethod(String methodName) //Update PayerID for which you want to run the sample code const string payerId = "M8R9JRNJ3R28Y"; - const string customerProfileId = "213213"; - const string customerPaymentProfileId = "2132345"; + const string customerProfileId = "1915435550"; //"213213"; + const string customerPaymentProfileId = "1828811149"; //"2132345"; + const string shippingAddressId = "1223213"; const decimal amount = 12.34m; const string subscriptionId = "1223213"; const short day = 45; const string emailId = "test@test.com"; +#if NETCOREAPP2_0 + // DOTNET CORE SPECIFIC + #region DOTNET CORE SPECIFIC + + ApiOperationBase.RunEnvironment = AuthorizeNet.Environment.SANDBOX; + ApiOperationBase.RunEnvironment.HttpUseProxy = AuthorizeNet.Environment.getBooleanProperty(Constants.HttpsUseProxy); + + if (ApiOperationBase.RunEnvironment.HttpUseProxy) + { + ApiOperationBase.RunEnvironment.HttpUseProxy = AuthorizeNet.Environment.getBooleanProperty(Constants.HttpsUseProxy); + ApiOperationBase.RunEnvironment.HttpsProxyUsername = AuthorizeNet.Environment.GetProperty(Constants.HttpsProxyUsername); + ApiOperationBase.RunEnvironment.HttpsProxyPassword = AuthorizeNet.Environment.GetProperty(Constants.HttpsProxyPassword); + ApiOperationBase.RunEnvironment.HttpProxyHost = AuthorizeNet.Environment.GetProperty(Constants.HttpsProxyHost); + ApiOperationBase.RunEnvironment.HttpProxyPort = AuthorizeNet.Environment.getIntProperty(Constants.HttpsProxyPort); + } + + #endregion +#endif + switch (methodName) { case "ValidateCustomerPaymentProfile": @@ -260,7 +286,7 @@ private static void RunMethod(String methodName) case "PayPalAuthorizeCapture": PayPalAuthorizeCapture.Run(apiLoginId, transactionKey, amount); break; - case "PayPalAuthorizeCaptureContinued": + case "PayPalAuthorizeCaptureContinued": PayPalAuthorizeCaptureContinued.Run(apiLoginId, transactionKey, transactionId, payerId); break; case "PayPalAuthorizeOnly": @@ -285,7 +311,7 @@ private static void RunMethod(String methodName) CreateSubscription.Run(apiLoginId, transactionKey, day); break; case "CreateSubscriptionFromCustomerProfile": - CreateSubscriptionFromCustomerProfile.Run(apiLoginId, transactionKey, day, "12322","232321","123232"); + CreateSubscriptionFromCustomerProfile.Run(apiLoginId, transactionKey, day, "12322", "232321", "123232"); break; case "GetListOfSubscriptions": GetListOfSubscriptions.Run(apiLoginId, transactionKey); @@ -312,11 +338,11 @@ private static void RunMethod(String methodName) GetBatchStatistics.Run(apiLoginId, transactionKey); break; case "GetSettledBatchList": - GetSettledBatchList.Run(apiLoginId,transactionKey); - break; + GetSettledBatchList.Run(apiLoginId, transactionKey); + break; case "UpdateSplitTenderGroup": - UpdateSplitTenderGroup.Run(apiLoginId, transactionKey); - break; + UpdateSplitTenderGroup.Run(apiLoginId, transactionKey); + break; case "GetHeldTransactionList": GetHeldTransactionList.Run(apiLoginId, transactionKey); break; @@ -324,11 +350,14 @@ private static void RunMethod(String methodName) ApproveOrDeclineHeldTransaction.Run(apiLoginId, transactionKey); break; case "GetMerchantDetails": - GetMerchantDetails.Run(apiLoginId, transactionKey); - break; + GetMerchantDetails.Run(apiLoginId, transactionKey); + break; case "GetAnAcceptPaymentPage": GetAnAcceptPaymentPage.Run(apiLoginId, transactionKey, 12.23m); break; + case "CreateAnAcceptPaymentTransaction": + CreateAnAcceptPaymentTransaction.Run(apiLoginId, transactionKey, 12.23m); + break; case "GetCustomerProfileTransactionList": GetCustomerProfileTransactionList.Run(apiLoginId, transactionKey, customerProfileId); break; diff --git a/SampleCode.csproj b/SampleCode.csproj index 96585c5..8deae44 100644 --- a/SampleCode.csproj +++ b/SampleCode.csproj @@ -35,8 +35,9 @@ false - - packages\AuthorizeNet.1.9.6\lib\AuthorizeNet.dll + + packages\AuthorizeNet.1.9.7\lib\AuthorizeNet.dll + True @@ -100,6 +101,8 @@ + + diff --git a/SampleCode.exe b/SampleCode.exe new file mode 100644 index 0000000..b276521 Binary files /dev/null and b/SampleCode.exe differ diff --git a/SampleCode.exe.config b/SampleCode.exe.config new file mode 100644 index 0000000..8e15646 --- /dev/null +++ b/SampleCode.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/SampleCode.vshost.exe b/SampleCode.vshost.exe new file mode 100644 index 0000000..8f90da4 Binary files /dev/null and b/SampleCode.vshost.exe differ diff --git a/SampleCode.vshost.exe.config b/SampleCode.vshost.exe.config new file mode 100644 index 0000000..8e15646 --- /dev/null +++ b/SampleCode.vshost.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/SampleCodeTest/Properties/AssemblyInfo.cs b/SampleCodeTest/Properties/AssemblyInfo.cs index f5998a7..4d3ee67 100644 --- a/SampleCodeTest/Properties/AssemblyInfo.cs +++ b/SampleCodeTest/Properties/AssemblyInfo.cs @@ -32,5 +32,8 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] + +[assembly: AssemblyVersion("0.9.0.0")] +[assembly: AssemblyFileVersion("0.9.0.0")] + + diff --git a/SampleCodeTest/SampleCodeList.txt b/SampleCodeTest/SampleCodeList.txt index dd9de28..6a9d86b 100644 --- a/SampleCodeTest/SampleCodeList.txt +++ b/SampleCodeTest/SampleCodeList.txt @@ -1,5 +1,4 @@ SampleCode IsDependent RunApi -CreateSubscription 1 1 CreateSubscriptionFromCustomerProfile 1 1 GetCustomerPaymentProfileList 0 1 GetTransactionList 0 1 @@ -55,4 +54,4 @@ CreateCustomerPaymentProfile 1 1 GetMerchantDetails 0 1 GetAnAcceptPaymentPage 1 1 UpdateHeldTransaction 1 0 -GetAccountUpdaterJobSummary 1 0 +GetAccountUpdaterJobSummary 1 0 \ No newline at end of file diff --git a/SampleCodeTest/SampleCodeTest_DotNet_Core.csproj b/SampleCodeTest/SampleCodeTest_DotNet_Core.csproj new file mode 100644 index 0000000..e42bbe2 --- /dev/null +++ b/SampleCodeTest/SampleCodeTest_DotNet_Core.csproj @@ -0,0 +1,58 @@ + + + + netcoreapp2.0 + Microsoft + 0.9.0.0 + 0.9.0.0 + 0.9.0.0 + + + + bin\ + + + + bin\ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ..\DotnetCoreArtifacts\AuthorizeNET.dll + + + + diff --git a/SampleCodeTest/TestRunner.cs b/SampleCodeTest/TestRunner.cs index 79fa80e..7d0e75d 100644 --- a/SampleCodeTest/TestRunner.cs +++ b/SampleCodeTest/TestRunner.cs @@ -11,6 +11,9 @@ using System.Threading; using net.authorize.sample.CustomerProfiles; using net.authorize.sample.MobileInappTransactions; +#if NETCOREAPP2_0 +using AuthorizeNet.Utilities; +#endif namespace SampleCodeTest { @@ -42,65 +45,101 @@ private static short GetMonth() [Test] public void TestAllSampleCodes() { - string fileName = Constants.CONFIG_FILE; - StreamReader reader = File.OpenText(fileName); - TestRunner tr = new TestRunner(); - var numRetries = 3; - string line; - while ((line = reader.ReadLine()) != null) +#if NETCOREAPP2_0 + // DOTNET CORE SPECIFIC + #region DOTNET CORE SPECIFIC + + ApiOperationBase.RunEnvironment = AuthorizeNet.Environment.SANDBOX; + ApiOperationBase.RunEnvironment.HttpUseProxy = AuthorizeNet.Environment.getBooleanProperty(AuthorizeNet.Utilities.Constants.HttpsUseProxy); + + if(ApiOperationBase.RunEnvironment.HttpUseProxy) { - string[] items = line.Split('\t'); - - string apiName = items[0]; - string isDependent = items[1]; - string shouldApiRun = items[2]; - - if (!shouldApiRun.Equals("1")) - continue; - - Console.WriteLine(new String('-', 20)); - Console.WriteLine("Running test case for :: " + apiName); - Console.WriteLine(new String('-', 20)); - ANetApiResponse response = null; - for (int i = 0; i < numRetries; ++i) + ApiOperationBase.RunEnvironment.HttpUseProxy = AuthorizeNet.Environment.getBooleanProperty(AuthorizeNet.Utilities.Constants.HttpsUseProxy); + ApiOperationBase.RunEnvironment.HttpsProxyUsername = AuthorizeNet.Environment.GetProperty(AuthorizeNet.Utilities.Constants.HttpsProxyUsername); + ApiOperationBase.RunEnvironment.HttpsProxyPassword = AuthorizeNet.Environment.GetProperty(AuthorizeNet.Utilities.Constants.HttpsProxyPassword); + ApiOperationBase.RunEnvironment.HttpProxyHost = AuthorizeNet.Environment.GetProperty(AuthorizeNet.Utilities.Constants.HttpsProxyHost); + ApiOperationBase.RunEnvironment.HttpProxyPort = AuthorizeNet.Environment.getIntProperty(AuthorizeNet.Utilities.Constants.HttpsProxyPort); + } + + #endregion +#endif + + try + { + string fileName = Constants.CONFIG_FILE; + using (StreamReader reader = File.OpenText(fileName)) { - try + TestRunner tr = new TestRunner(); + var numRetries = 3; + + string line; + while ((line = reader.ReadLine()) != null) { - if (isDependent.Equals("0")) - { - response = InvokeRunMethod(apiName); - } - else + string[] items = line.Split('\t'); + + string apiName = items[0]; + string isDependent = items[1]; + string shouldApiRun = items[2]; + + if (!shouldApiRun.Equals("1")) + continue; +#if NETCOREAPP2_0 + Thread.Sleep(3000); +#endif + Console.WriteLine(new String('-', 20)); + Console.WriteLine("Running test case for :: " + apiName); + Console.WriteLine(new String('-', 20)); + ANetApiResponse response = null; + for (int i = 0; i < numRetries; ++i) { - response = (ANetApiResponse)typeof(TestRunner).GetMethod("Test" + apiName).Invoke(tr, new Object[] { }); + try + { + if (isDependent.Equals("0")) + { + response = InvokeRunMethod(apiName); + } + else + { + response = (ANetApiResponse)typeof(TestRunner).GetMethod("Test" + apiName).Invoke(tr, new Object[] { }); + } + + if ((response != null) && (response.messages.resultCode == messageTypeEnum.Ok)) + break; + } + catch (Exception e) + { + Console.WriteLine(apiName); + Console.WriteLine(e.ToString()); + } } - - if ((response != null) && (response.messages.resultCode == messageTypeEnum.Ok)) - break; - } - catch (Exception e) - { - Console.WriteLine(apiName); - Console.WriteLine(e.ToString()); + Assert.IsNotNull(response); + Assert.AreEqual(response.messages.resultCode, messageTypeEnum.Ok); } } - Assert.IsNotNull(response); - Assert.AreEqual(response.messages.resultCode, messageTypeEnum.Ok); + } + catch (Exception ex) + { + + throw ex; } } public ANetApiResponse InvokeRunMethod(string className) { string namespaceString = "net.authorize.sample."; - + if (className.Equals(typeof(UpdateSplitTenderGroup).Name)) namespaceString = namespaceString + "PaymentTransactions."; if (className.Equals(typeof(CreateAnApplePayTransaction).Name)) namespaceString = namespaceString + "ApplePayTransactions."; - - Type classType = Type.GetType(namespaceString + className + ",SampleCode"); + Type classType = null; +#if NETCOREAPP2_0 + classType = Type.GetType(namespaceString + className + ",SampleCode_DotNet_Core"); +#else + classType = Type.GetType(namespaceString + className + ",SampleCode"); +#endif return (ANetApiResponse)classType.GetMethod("Run").Invoke(null, new Object[] { apiLoginId, transactionKey }); } @@ -110,25 +149,25 @@ public ANetApiResponse TestValidateCustomerPaymentProfile() var customerPaymentProfile = (createCustomerPaymentProfileResponse)CreateCustomerPaymentProfile.Run(apiLoginId, transactionKey, response.customerProfileId); var validateResponse = ValidateCustomerPaymentProfile.Run(apiLoginId, transactionKey, response.customerProfileId, customerPaymentProfile.customerPaymentProfileId); DeleteCustomerProfile.Run(apiLoginId, transactionKey, response.customerProfileId); - + return validateResponse; } public ANetApiResponse TestCaptureFundsAuthorizedThroughAnotherChannel() { - return CaptureFundsAuthorizedThroughAnotherChannel.Run(apiLoginId, transactionKey, GetAmount()); + return CaptureFundsAuthorizedThroughAnotherChannel.Run(apiLoginId, transactionKey, GetAmount()); } public ANetApiResponse TestDebitBankAccount() { return DebitBankAccount.Run(apiLoginId, transactionKey, GetAmount()); } - + public ANetApiResponse TestUpdateCustomerShippingAddress() { var response = (createCustomerProfileResponse)CreateCustomerProfile.Run(apiLoginId, transactionKey, GetEmail()); var shippingResponse = (createCustomerShippingAddressResponse)CreateCustomerShippingAddress.Run(apiLoginId, transactionKey, response.customerProfileId); - var updateResponse = (updateCustomerShippingAddressResponse) UpdateCustomerShippingAddress.Run(apiLoginId, transactionKey, response.customerProfileId, shippingResponse.customerAddressId); + var updateResponse = (updateCustomerShippingAddressResponse)UpdateCustomerShippingAddress.Run(apiLoginId, transactionKey, response.customerProfileId, shippingResponse.customerAddressId); DeleteCustomerProfile.Run(apiLoginId, transactionKey, response.customerProfileId); return updateResponse; @@ -139,7 +178,7 @@ public ANetApiResponse TestUpdateCustomerProfile() var response = (createCustomerProfileResponse)CreateCustomerProfile.Run(apiLoginId, transactionKey, GetEmail()); var updateResponse = UpdateCustomerProfile.Run(apiLoginId, transactionKey, response.customerProfileId); DeleteCustomerProfile.Run(apiLoginId, transactionKey, response.customerProfileId); - + return updateResponse; } @@ -159,13 +198,13 @@ public ANetApiResponse TestGetCustomerShippingAddress() var response = (createCustomerProfileResponse)CreateCustomerProfile.Run(apiLoginId, transactionKey, GetEmail()); var shippingResponse = (createCustomerShippingAddressResponse)CreateCustomerShippingAddress.Run(apiLoginId, transactionKey, response.customerProfileId); - var getResponse = GetCustomerShippingAddress.Run(apiLoginId, transactionKey, + var getResponse = GetCustomerShippingAddress.Run(apiLoginId, transactionKey, response.customerProfileId, shippingResponse.customerAddressId); DeleteCustomerProfile.Run(apiLoginId, transactionKey, response.customerProfileId); return getResponse; } - + public ANetApiResponse TestGetCustomerProfileIds() { return GetCustomerProfileIds.Run(apiLoginId, transactionKey); @@ -199,7 +238,7 @@ public ANetApiResponse TestGetCustomerPaymentProfile() DeleteCustomerProfile.Run(apiLoginId, transactionKey, response.customerProfileId); return getResponse; } - + public ANetApiResponse TestDeleteCustomerShippingAddress() { var response = (createCustomerProfileResponse)CreateCustomerProfile.Run(apiLoginId, transactionKey, GetEmail()); @@ -233,7 +272,7 @@ public ANetApiResponse TestCreateCustomerShippingAddress() var response = (createCustomerProfileResponse)CreateCustomerProfile.Run(apiLoginId, transactionKey, GetEmail()); var shippingResponse = (createCustomerShippingAddressResponse)CreateCustomerShippingAddress.Run(apiLoginId, transactionKey, response.customerProfileId); DeleteCustomerProfile.Run(apiLoginId, transactionKey, response.customerProfileId); - + return shippingResponse; } @@ -248,7 +287,7 @@ public ANetApiResponse TestCreateCustomerProfileFromTransaction() var response = (createTransactionResponse)AuthorizeCreditCard.Run(apiLoginId, transactionKey, GetAmount()); var profileResponse = (createCustomerProfileResponse)CreateCustomerProfileFromTransaction.Run(apiLoginId, transactionKey, response.transactionResponse.transId); DeleteCustomerProfile.Run(apiLoginId, transactionKey, profileResponse.customerProfileId); - + return profileResponse; } @@ -301,13 +340,13 @@ public ANetApiResponse TestChargeCustomerProfile() public ANetApiResponse TestPayPalAuthorizeOnly() { return PayPalAuthorizeOnly.Run(apiLoginId, transactionKey, GetAmount()); - } - + } + public ANetApiResponse TestPayPalVoid() { var response = (createTransactionResponse)PayPalAuthorizeCapture.Run(apiLoginId, transactionKey, GetAmount()); return PayPalVoid.Run(apiLoginId, transactionKey, response.transactionResponse.transId); - } + } public ANetApiResponse TestPayPalAuthorizeCapture() { @@ -318,13 +357,13 @@ public ANetApiResponse TestPayPalAuthorizeCaptureContinued() { var response = (createTransactionResponse)PayPalAuthorizeCapture.Run(apiLoginId, transactionKey, GetAmount()); return PayPalAuthorizeCaptureContinued.Run(apiLoginId, transactionKey, response.transactionResponse.transId, payerID); - } - + } + public ANetApiResponse TestPayPalAuthorizeOnlyContinued() { return PayPalAuthorizeOnlyContinued.Run(apiLoginId, transactionKey, TransactionID, payerID); } - + public ANetApiResponse TestPayPalCredit() { return PayPalCredit.Run(apiLoginId, transactionKey, TransactionID); @@ -364,7 +403,7 @@ public ANetApiResponse TestCreateSubscriptionFromCustomerProfile() DeleteCustomerProfile.Run(apiLoginId, transactionKey, profileResponse.customerProfileId); return response; } - + public ANetApiResponse TestCreateSubscription() { var response = (ARBCreateSubscriptionResponse)CreateSubscription.Run(apiLoginId, transactionKey, GetMonth()); @@ -372,12 +411,12 @@ public ANetApiResponse TestCreateSubscription() return response; } - + public ANetApiResponse TestGetSubscriptionStatus() { var response = (ARBCreateSubscriptionResponse)CreateSubscription.Run(apiLoginId, transactionKey, GetMonth()); var subscriptionResponse = GetSubscriptionStatus.Run(apiLoginId, transactionKey, response.subscriptionId); - + return subscriptionResponse; } @@ -403,7 +442,7 @@ public ANetApiResponse TestCreateCustomerProfile() { return CreateCustomerProfile.Run(apiLoginId, transactionKey, GetEmail()); } - + public ANetApiResponse TestCreateCustomerPaymentProfile() { var response = (createCustomerProfileResponse)CreateCustomerProfile.Run(apiLoginId, transactionKey, GetEmail()); @@ -431,9 +470,5 @@ public ANetApiResponse TestGetAnAcceptPaymentPage() return GetAnAcceptPaymentPage.Run(apiLoginId, transactionKey, GetAmount()); } - //public ANetApiResponse TestGetAccountUpdaterJobSummary() - //{ - // return GetAccountUpdaterJobSummary.Run(apiLoginId, transactionKey); - //} } } diff --git a/SampleCodeTest/bin/Release/Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll b/SampleCodeTest/bin/Release/Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll deleted file mode 100644 index 95ad0cc..0000000 Binary files a/SampleCodeTest/bin/Release/Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll and /dev/null differ diff --git a/SampleCode_DotNet_Core.csproj b/SampleCode_DotNet_Core.csproj new file mode 100644 index 0000000..efc2f17 --- /dev/null +++ b/SampleCode_DotNet_Core.csproj @@ -0,0 +1,47 @@ + + + + Exe + + + + netcoreapp2.0 + + exe + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DotnetCoreArtifacts\AuthorizeNET.dll + + + \ No newline at end of file diff --git a/SampleCode_DotNet_Core.sln b/SampleCode_DotNet_Core.sln new file mode 100644 index 0000000..5170305 --- /dev/null +++ b/SampleCode_DotNet_Core.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.26228.4 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SampleCode_DotNet_Core", "SampleCode_DotNet_Core.csproj", "{50A29DBF-957F-4ECE-AC1C-4659DEAADB65}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SampleCodeTest_DotNet_Core", "SampleCodeTest\SampleCodeTest_DotNet_Core.csproj", "{A0955044-8446-45AE-A8E9-2D97299E5C6A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {50A29DBF-957F-4ECE-AC1C-4659DEAADB65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {50A29DBF-957F-4ECE-AC1C-4659DEAADB65}.Debug|Any CPU.Build.0 = Debug|Any CPU + {50A29DBF-957F-4ECE-AC1C-4659DEAADB65}.Release|Any CPU.ActiveCfg = Release|Any CPU + {50A29DBF-957F-4ECE-AC1C-4659DEAADB65}.Release|Any CPU.Build.0 = Release|Any CPU + {A0955044-8446-45AE-A8E9-2D97299E5C6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A0955044-8446-45AE-A8E9-2D97299E5C6A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A0955044-8446-45AE-A8E9-2D97299E5C6A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A0955044-8446-45AE-A8E9-2D97299E5C6A}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {5FED23EF-753E-4066-B03D-DCA65F19DCE5} + EndGlobalSection +EndGlobal diff --git a/TransactionReporting/GetAccountUpdaterJobDetails.cs b/TransactionReporting/GetAccountUpdaterJobDetails.cs index f74f4a0..ba201a2 100644 --- a/TransactionReporting/GetAccountUpdaterJobDetails.cs +++ b/TransactionReporting/GetAccountUpdaterJobDetails.cs @@ -25,12 +25,11 @@ public static ANetApiResponse Run(String ApiLoginID, String ApiTransactionKey) }; // parameters for request - string month = "2017-06"; - string modifiedTypeFilter = "all" + string month = "2018-05"; - var request = new getAccountUpdaterJobDetailsRequest(); + var request = new getAUJobDetailsRequest(); request.month = month; - request.modifiedTypeFilter = modifiedTypeFilter; + request.modifiedTypeFilter = AUJobTypeEnum.all; request.paging = new Paging { limit = 1000, @@ -38,7 +37,7 @@ public static ANetApiResponse Run(String ApiLoginID, String ApiTransactionKey) }; // instantiate the controller that will call the service - var controller = new getAccountUpdaterJobDetailsController(request); + var controller = new getAUJobDetailsController(request); controller.Execute(); // get the response from the service (errors contained if any) @@ -49,20 +48,20 @@ public static ANetApiResponse Run(String ApiLoginID, String ApiTransactionKey) if (response.auDetails == null) return response; - foreach (var update in response.auDetails.auUpdate) + foreach (var update in response.auDetails) { Console.WriteLine("Profile ID / Payment Profile ID: {0} / {1}", update.customerProfileID, update.customerPaymentProfileID); Console.WriteLine("Update Time (UTC): {0}", update.updateTimeUTC); Console.WriteLine("Reason Code: {0}", update.auReasonCode); - Console.WriteLine("Reason Description: {0}", update.reasonDescription); + Console.WriteLine("Reason Description: {0}", update.reasonDescription); } - foreach (var delete in response.auDetails.auDelete) + foreach (var delete in response.auDetails) { - Console.WriteLine("Profile ID / Payment Profile ID: {0} / {1}", delete.customerProfileID, update.customerPaymentProfileID); + Console.WriteLine("Profile ID / Payment Profile ID: {0} / {1}", delete.customerProfileID, delete.customerPaymentProfileID); Console.WriteLine("Update Time (UTC): {0}", delete.updateTimeUTC); Console.WriteLine("Reason Code: {0}", delete.auReasonCode); - Console.WriteLine("Reason Description: {0}", delete.reasonDescription); + Console.WriteLine("Reason Description: {0}", delete.reasonDescription); } } else if (response != null) diff --git a/packages.config b/packages.config index 14e8214..71d0944 100644 --- a/packages.config +++ b/packages.config @@ -1,6 +1,6 @@  - + diff --git a/packagesCore.config b/packagesCore.config new file mode 100644 index 0000000..e21ee14 --- /dev/null +++ b/packagesCore.config @@ -0,0 +1,5 @@ + + + + +