Client for the Cloud Payments payment service allows access the Cloud Payments API from Golang code.
go get github.com/raymayemir/cp-go
Property | Type | Description | Default | Required |
---|---|---|---|---|
ApiSecret | string |
Secret key (you can get it in your personal account) | empty string |
true |
PublicId | string |
Public key (you can get it in your personal account) | empty string |
true |
Timeout | time.Duration |
Request timeout | 30 * time.Second |
false |
import cp "github.com/raymayemir/cp-go"
client := cp.NewClient(cp.Config{
ApiSecret: "api_secret",
PublicId: "public_id",
Timeout: 30 * time.Second,
})
response, err := client.Ping()
...
Test method description
response, err := client.Ping()
If successful, it returns a map[string]interface{}
else returns error
.
- Receipt
- Notification handlers?
- Finish (todo) marked methods
- API methods multiple return values or just no need to
PaymentFailedResponse
- Create issue
- Create pull-request
MIT