/PayKassaSCI

Golang wrapper for PayKassa SCI v0.4

Primary LanguageGoMIT LicenseMIT

Paykassa SCI

GoDoc Go Report Card

Golang wrapper for PayKassa SCI v0.4

Install

Install the package with:

go get github.com/oashnic/PayKassaSCI

Import it with:

import "github.com/oashnic/PayKassaSCI"

and use paykassasci as the package name inside the code.

Example

package main

import (
	"fmt"
	"gitlab.com/oashnic/PayKassa"
	"log"
)

func main() {
	var merchantID = 1234
	var merchantKey = "QQQQQQQQQQQQQQQ"
	var testPay = false
	sci := PayKassaSCI.InitSCI(merchantID, merchantKey, testPay)

	var orderID = 1234
	var amount = 2
	var comment = "test"
	var phone = false
	var paidCommission = "shop"

	resp, err := sci.GetLinkForDeposit(orderID, amount, PayKassaSCI.BitCoin, comment, phone, paidCommission)

	if err != nil{
		log.Fatalln(err)
	}

	if resp.Error {
		log.Fatalln(resp.Message)
		return
	}

	fmt.Println("URL paying process: " + resp.Data.URL)
}