Skip to content

Commit 195f7cf

Browse files
authored
Merge pull request #304 from richzw/master
feat(appstore): change the response of api server from interface to specific response
2 parents 0f61393 + 4397996 commit 195f7cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

appstore/api/validator.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
// IAPAPIClient is an interface to call validation API in App Store Server API
99
type IAPAPIClient interface {
10-
Verify(ctx context.Context, transactionId string) (interface{}, error)
10+
Verify(ctx context.Context, transactionId string) (*TransactionInfoResponse, error)
1111
}
1212

1313
type APIClient struct {
@@ -23,7 +23,7 @@ func NewAPIClient(config StoreConfig) *APIClient {
2323
return &APIClient{productionCli: NewStoreClient(&prodConf), sandboxCli: NewStoreClient(&sandboxConf)}
2424
}
2525

26-
func (c *APIClient) Verify(ctx context.Context, transactionId string) (interface{}, error) {
26+
func (c *APIClient) Verify(ctx context.Context, transactionId string) (*TransactionInfoResponse, error) {
2727
result, err := c.productionCli.GetTransactionInfo(ctx, transactionId)
2828
if err != nil && errors.Is(err, TransactionIdNotFoundError) {
2929
result, err = c.sandboxCli.GetTransactionInfo(ctx, transactionId)

0 commit comments

Comments
 (0)