java - Need help to setup google merchant request -


i'm trying develop simple online shop application using java, , got hand of google online payment.
signed google merchant, , have got issuer , secret code.
i've got question sample provided google, following code sample merchant requests.

private string getjwt() throws invalidkeyexception, signatureexception {   jsontoken token = null;   token = createtoken();   return token.serializeandsign(); }  private jsontoken createtoken() throws invalidkeyexception{   //current time , signing algorithm   calendar cal = calendar.getinstance();   hmacsha256signer signer = new hmacsha256signer(issuer, null, signing_key.getbytes());    //configure json token   jsontoken token = new jsontoken(signer);   token.setaudience("google");   token.setparam("typ", "google/payments/inapp/item/v1");   token.setissuedat(new instant(cal.gettimeinmillis()));   token.setexpiration(new instant(cal.gettimeinmillis() + 60000l));    //configure request object   jsonobject request = new jsonobject();   request.addproperty("name", "piece of cake");   request.addproperty("description", "virtual chocolate cake fill virtual tummy");   request.addproperty("price", "10.50");   request.addproperty("currencycode", "usd");   request.addproperty("sellerdata", "user_id:1224245,offer_code:3098576987,affiliate:aksdfbovu9j");    jsonobject payload = token.getpayloadasjsonobject();   payload.add("request", request);    return token; } 

everything clear except line

request.addproperty("sellerdata", "user_id:1224245,offer_code:3098576987,affiliate:aksdfbovu9j"); 

would explain how supposed set these? , these?!

finally found :d
https://developers.google.com/wallet/digital/docs/jsreference#jwt
it's optional field, google sends same data when transaction success issuer postback uri.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -