Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP postback url google wallet IAP
    primarykey
    data
    text
    <p>My postback php for google wallet in-app payments looks like this:</p> <pre><code>&lt;?php $payload = array( "iss" =&gt; $sellerIdentifier, "aud" =&gt; "Google", "typ" =&gt; "google/payments/inapp/item/v1", "exp" =&gt; time() + 3600, "iat" =&gt; time(), "request" =&gt; array ( "name" =&gt; "pizza ", "description" =&gt; "yum yum", "price" =&gt; "10.50", "currencyCode" =&gt; "USD", "sellerData" =&gt; "", ) ); $testToken = JWT::encode($payload, $sellerSecret); ?&gt; </code></pre> <p>I have two questions:</p> <p>1. why do I see this error?... Uh oh. There was a problem. We couldn't complete your purchase because of a technical issue. Details of the problem below:Unfortunately, we could not confirm your purchase with the merchant's server. Your order has been canceled. Please contact the merchant if this problem continues.</p> <p>2. How can this work if I have multiple items for sale? the example php above lets you buy a 'pizza for $10.50' how can I add another item like a 'hotdog for $2.99'?</p> <p>ps: I have studied the following documentation:</p> <p><a href="https://developers.google.com/in-app-payments/docs/tutorial#4" rel="nofollow">https://developers.google.com/in-app-payments/docs/tutorial#4</a></p> <p><a href="https://developers.google.com/in-app-payments/docs/jsreference#jwt" rel="nofollow">https://developers.google.com/in-app-payments/docs/jsreference#jwt</a></p> <p><a href="https://developers.google.com/in-app-payments/docs/postback" rel="nofollow">https://developers.google.com/in-app-payments/docs/postback</a></p> <p>Thank you for your time.</p> <p>//update!</p> <p>postback.php: require_once 'JWT.php';</p> <p>JWT.php: $json = json_encode($input, JSON_UNESCAPED_SLASHES);</p> <p>Uh oh. There was a problem. We couldn't complete your purchase because of a technical issue. Details of the problem below: Unfortunately, we could not confirm your purchase with the merchant's server. Your order has been canceled. Please contact the merchant if this problem continues.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload