Giter VIP home page Giter VIP logo

sample-code-java's Introduction

Java Sample Code for the Authorize.Net SDK

Travis CI Status

This repository contains working code samples which demonstrate Java integration with the Authorize.Net Java SDK.

The samples are organized into categories and common usage examples, just like our API Reference Guide. Our API Reference Guide is an interactive reference for the Authorize.Net API. It explains the request and response parameters for each API method and has embedded code windows to allow you to send actual requests right within the API Reference Guide.

Using the Sample Code

The samples are all completely independent and self-contained. You can analyze them to get an understanding of how a particular method works, or you can use the snippets as a starting point for your own project.

You can also run each sample directly from the command line.

Running the Samples From the Command Line

  • Clone this repository:
    $ git clone https://github.com/AuthorizeNet/sample-code-java.git
  • Run "mvn package" in the root directory to create the SampleCode console app.
  • Run the individual samples by name. For example:
     > java -jar target/SampleCode.jar [CodeSampleName]

e.g.

     > java -jar target/SampleCode.jar ChargeCreditCard

Running SampleCode without a parameter will give you the list of sample names.

NOTE : You can update to your Sandbox credentials in SampleCode.java

For using behind proxy

Please set the JAVA environment proxy using a similar code :

    System.setProperty(Constants.HTTPS_USE_PROXY, "true");
    System.setProperty(Constants.HTTPS_PROXY_HOST, "127.0.0.1");
    System.setProperty(Constants.HTTPS_PROXY_PORT, "8888");

For using proxy authentication

Please set the JAVA environment proxy credentials using a similar code :

    System.setProperty(Constants.HTTPS_PROXY_USERNAME, "exampleUsername");
    System.setProperty(Constants.HTTPS_PROXY_PASSWORD, "examplePassword");

sample-code-java's People

Contributors

gnongsie avatar brianmc avatar kikmak42 avatar adavidw avatar namanbansal avatar anuvaradha avatar nagarikantipavan avatar akankaria avatar ashtru avatar sapbasu15 avatar khaaldrogo avatar rahulrnitc avatar metroid-samus avatar karthikeyanrzp avatar akashshah1203 avatar anuragg29 avatar vsavaradha avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.