a5ggooglepayments

package
v0.0.0-...-35a760b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValid

func IsValid(
	base64EncodedPublicKey, receiptSignature string, saleReceipt []byte) (
	bool, error)

IsValid <https://developer.android.com/google/play/licensing/setting-up.html>.

Types

type GoogleInappPurchaseReceipt

type GoogleInappPurchaseReceipt struct {
	OrderID          string `json:"orderId"`
	PackageName      string `json:"packageName"`
	ProductID        string `json:"productId"`
	PurchaseTime     uint64 `json:"purchaseTime"`
	PurchaseState    uint64 `json:"purchaseState"`
	DeveloperPayload string `json:"developerPayload,omitempty"`
	PurchaseToken    string `json:"purchaseToken"`
}

GoogleInappPurchaseReceipt some documentation: <https://developer.android.com/google/play/billing/billing_integrate.html#Purchase>, <https://developer.android.com/google/play/billing/billing_reference.html>. Example:

{
   \"orderId\":\"12999763169054705758.1371079406387615\",
   \"packageName\":\"com.example.app\",
   \"productId\":"exampleSku\",
   \"purchaseTime\":1345678900000,
   \"purchaseState\":0,
   \"developerPayload\":\"bGoa+V7g/yqDXvKRqq+JTFn4uQZbPiQJo4pf9RzJ\",
   \"purchaseToken\":\"rojeslcdyyiapnqcynkjyyjh\"
 }

func (*GoogleInappPurchaseReceipt) Validate

func (v *GoogleInappPurchaseReceipt) Validate() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL