0
Their Python example似乎是最簡單的,雖然我用命名cakeToken變量,因爲這是與項目名稱困惑我所購買不以爲然:如何使用ColdFusion 9或更高版本語法對jwt進行編碼?
cakeToken = jwt.encode(
{
"iss" : sellerIdentifier,
"aud" : "Google",
"typ" : "google/payments/inapp/item/v1",
"exp" : int(time.time() + 3600),
"iat" : int(time.time()),
"request" :{
"name" : "Piece of Cake",
"description" : "Virtual chocolate cake to fill your virtual tummy",
"price" : "10.50",
"currencyCode" : "USD",
"sellerData" : "user_id:1224245,offer_code:3098576987,affiliate:aksdfbovu9j"
}
},
SELLER_SECRET)
問:他們從哪兒得到智威湯遜,或者是一個變量正在創建?
我想SELLER_SECRET是一個變量,從sandbox settings page填充。我想我們會用dateadd('s',3600,now())而不是time.time()+ 3600。
他們還建議使用Google OpenID而不是滾動自己的登錄名,但這似乎相當複雜。
謝謝肖恩! cfjwt任何人? –