Categorygithub.com/globalpayments/go-sdk
module
1.0.12
Repository: https://github.com/globalpayments/go-sdk.git
Documentation: pkg.go.dev

# README

Global Payments logo

Heartland & Global Payments Go SDK

This SDK makes it easy to integrate your Go application with our Card Not Present and Card Present APIs.

Solutions

Card Present (Terminal & POS) Specific

  • Minimize PCI Compliance requirements with Semi-Integrated / Out of Scope devices
  • Secure End-To-End Encryption

Requirements

  • Go v1.18+
  • github.com/shopspring/decimal v1.3.1+

Installation

To install via go get:

go get https://github.com/globalpayments/go-sdk

Documentation and Examples

You can find the latest SDK documentation along with code examples and test cards on the Global Payments and Heartland Developer Hubs.

In addition you can find working examples in the our example code repository.

Quick Tip: The included test suite can be a great source of code samples for using the SDK!

Process a Payment over UPA Example

    terminal, err := device.CreditSale(val)
	if err != nil {
		// handle errors
	}
	response, err := api.ExecuteTerminal(terminal)
	if err != nil {
		// handle errors
	}

Test Card Data

NameNumberExp MonthExp YearCVN
Visa4263970000005262122025123
MasterCard2223000010005780122019900
MasterCard5425230000004415122025123
Discover6011000000000087122025123
Amex3741010000006081220251234
JCB3566000000000000122025123
Diners Club36256000000725122025123

Testing Exceptions

During your integration you will want to test for specific issuer responses such as 'Card Declined'. Because our sandbox environments do not actually reach out to issuing banks for authorizations, there are specific transaction amounts and/or card numbers that will trigger gateway and issuing bank responses. Please contact your support representative for a complete listing of values used to simulate transaction AVS/CVV results, declines, errors, and other responses that can be caught in your code.

Contributing

All our code is open sourced and we encourage fellow developers to contribute and help improve it!

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Ensure SDK tests are passing
  4. Commit your changes (git commit -am 'Add some feature')
  5. Push to the branch (git push origin my-new-feature)
  6. Create new Pull Request

License

This project is licensed under the GNU General Public License v2.0. Please see LICENSE.md located at the project's root for more details.

# Packages

No description provided by the author
No description provided by the author