Skip to content

fix: Test transaction may also return 401 when queried in the production environment #315

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion appstore/api/validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import (
"context"
"errors"

Check failure on line 5 in appstore/api/validator.go

View workflow job for this annotation

GitHub Actions / Go 1.22 test

"errors" imported and not used

Check failure on line 5 in appstore/api/validator.go

View workflow job for this annotation

GitHub Actions / Go 1.23 test

"errors" imported and not used

Check failure on line 5 in appstore/api/validator.go

View workflow job for this annotation

GitHub Actions / Go 1.24 test

"errors" imported and not used
)

// IAPAPIClient is an interface to call validation API in App Store Server API
Expand All @@ -25,7 +25,7 @@

func (c *APIClient) Verify(ctx context.Context, transactionId string) (*TransactionInfoResponse, error) {
result, err := c.productionCli.GetTransactionInfo(ctx, transactionId)
if err != nil && errors.Is(err, TransactionIdNotFoundError) {
if err != nil {
result, err = c.sandboxCli.GetTransactionInfo(ctx, transactionId)
}
return result, err
Expand Down
Loading