Skip to content

The aim - simplify the chaos of the Server Side Validation of AD Platforms.

License

Notifications You must be signed in to change notification settings

hiyali/go-lib-ssv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-lib-ssv

The aim of this repository is simplify the chaos of the SSV

Verifiers added for

Quick look

import "github.com/hiyali/go-lib-ssv/admob"

func adMobVideoRewardedAdHandler(w http.ResponseWriter, r *http.Request) {
  // Magic
  if err := admob.Verify(r.URL); err != nil {
    log.Errorf("Verification failed - err: %v", err)
    return
  }

  // Verified
}

admob server callback url look like:

https://www.yourdomain.com/path?ad_network=5450213213286189855&ad_unit=12345678&reward_amount=10&reward_item=coins×tamp=1507770365237823&transaction_id=1234567890ABCDEF1234567890ABCDEF&user_id=1234567&signature=MEUCIQDGx44BZgQU6TU4iYEo1nyzh3NgDEvqNAUXlax-XPBQ5AIgCXSdjgKZvs_6QNYad29NJRqwGIhGb7GfuI914MDDZ1c&key_id=1268222887

Lib / Method

lib.Method Description
admob.Verify(url *url.Url) error
mopub.Verify(url *url.Url, secret, verifierKey string) error verifierKey usually is hash, you'll find secret key in Rewarded video tab in https://app.mopub.com/account page

All libs have LogEnabled property

// enable log query raw, default is: false
admob.LogEnabled = true

Test

go test ./...

Contribution

Feel free

LICENSE

MIT

About

The aim - simplify the chaos of the Server Side Validation of AD Platforms.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages