 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
      View Source
      
  
var ( ErrExists = errors.New("iap already exists") ErrNotFound = errors.New("iap not found") )
Functions ¶
This section is empty.
Types ¶
type Purchase ¶
type Server ¶
type Server struct {
	iappb.UnimplementedIapServer
	// contains filtered or unexported fields
}
    func (*Server) OnPurchaseCompleted ¶
func (s *Server) OnPurchaseCompleted(ctx context.Context, req *iappb.OnPurchaseCompletedRequest) (*iappb.OnPurchaseCompletedResponse, error)
todo: DB transaction for all calls todo: eventually we'll need to distinguish what was purchased
type Verifier ¶
type Verifier interface {
	// VerifyReceipt takes a IAP receipt (for iOS/Android usually a
	// base64-encoded string, for memory a signed payload) and determines if it
	// is valid and has purchased the required feature.
	VerifyReceipt(ctx context.Context, receipt string) (bool, error)
	// GetReceiptIdentifier takes a IAP receipt and returns the identifier of the
	// purchased feature. This can be used to identify the receipt in the system.
	GetReceiptIdentifier(ctx context.Context, receipt string) ([]byte, error)
}
     Click to show internal directories. 
   Click to hide internal directories.