Categorygithub.com/Jetpay/paymentpage-sdk-go
modulepackage
0.0.0-20240626065931-ded61185aa00
Repository: https://github.com/jetpay/paymentpage-sdk-go.git
Documentation: pkg.go.dev

# README

Jetpay payment page SDK

This is a set of libraries in the Go language to ease integration of your service with the Jetpay Payment Page.

Payment flow

Payment flow

Installation

Simply use go get:

go get github.com/Jetpay/paymentpage-sdk-go

To update later:

go get -u github.com/Jetpay/paymentpage-sdk-go

Get URL for payment

import "github.com/Jetpay/paymentpage-sdk-go"

payment := paymentpage.NewPayment(11, "test_payment_id")
payment.SetParam(paymentpage.ParamPaymentCurrency, "EUR")
payment.SetParam(paymentpage.ParamPaymentAmount, 1000)

gate := paymentpage.NewGate("your project secret")
paymentPageUrl := gate.GetPaymentPageUrl(*payment)

paymentPageUrl here is the signed URL.

Handle callback from Jetpay

You'll need to autoload this code in order to handle notifications:

import "github.com/Jetpay/paymentpage-sdk-go"

gate := paymentpage.NewGate("your project secret")
callback, err := gate.HandleCallback(data)

data is the JSON string received from payment system;

err nil or error interface; error returned if signature invalid or callback data can't parse;

callback is the Callback object describing properties received from payment system; callback implements these methods:

  1. callback.GetPaymentStatus() Get payment status.
  2. callback.GetPayment() Get all payment data.
  3. callback.GetPaymentId() Get payment ID in your system.

# Functions

Constructor for Callback structure.
Constructor for Gate structure.
Constructor for Payment structure.
Constructor for PaymentPage structure.
Constructor for SignatureHandler structure.

# Constants

Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible statuses of payment.
Constants with possible statuses of payment.
Constants with possible statuses of payment.
Constants with possible statuses of payment.
Constants with possible statuses of payment.
Constants with possible statuses of payment.
Constants with possible statuses of payment.
Constants with possible statuses of payment.
Constants with possible statuses of payment.
Constants with possible statuses of payment.
Constants with possible statuses of payment.
Constants with possible statuses of payment.
Constants with possible statuses of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.
Constants with possible payment params and types of payment.

# Structs

Structure for processing callbacks.
Structure for communicate with our.
Structure for preparing payment params.
Structure for build payment URL.
Structure for make/check signature.