Skip to content

Latest commit

 

History

History
33 lines (26 loc) · 615 Bytes

README.md

File metadata and controls

33 lines (26 loc) · 615 Bytes

Cloudpayments SDK

Installation

go get -u github.com/onemgvv/cloudpayments

Usage

sdk := cloudpayments.New("secret-from-lk", "your-public-id")

params := cloudpayments.CryptoPayRequest{
  Amount: 500.3,
  Currency: cloudpayments.RUB,
  IpAddress: "127.0.0.1",
  CardCryptogramPacket: "eyJUeXBlIjoiQ2xvdWRDYXJkIiwi...",
  Name: "Michael",
  PaymentUrl: "https://my-site.com/payment/cb",
  InvoiceId: "invoice12-333",
  CultureName: "ru-RU",
  AccountId: "10",
  Email: "[email protected]",
}

resp, err := sdk.PayByCryptogram(params)
if err != nil {
  // handle error
}

// use response