Closed YudeMgoy closed 4 years ago
Why the response return data like this? what is this?
this is my code on server side ` require_once app_path().'/../vendor/autoload.php';
// receipt data $packageName = "com.smeatech.weeby"; $productId = "weeby_premium2"; $purchaseToken = "olgkmglhgekmamomdhfaeidm.AO-J1OzIeJpD-lu1wJbbneIRXY_2Plzp6scVRfcAHtrxyW1tCQFVumpASKR0Pgk5c9TDqKLVgRxtC_75ziaPvyVDndYbIzUx7w"; $client = new \Google_Client(); $client->setApplicationName("Weeby"); $client->setAuthConfig(app_path().'/googleserviceconfig.json'); $client->setScopes([\Google_Service_AndroidPublisher::ANDROIDPUBLISHER]); $validator = new PlayValidator(new \Google_Service_AndroidPublisher($client)); try { $response = $validator->setPackageName($packageName)->setProductId($productId)->setPurchaseToken($purchaseToken)->validateSubscription(); return response()->json($response); } catch (Exception $e) { echo 'got error = '.$e->getMessage().PHP_EOL; }`
Could you show the raw response? you shown response handled by your response() function.
Now it's return error like that
Problem connected with other libraries, firebase-jwt in your case.
Why the response return data like this? what is this?
this is my code on server side ` require_once app_path().'/../vendor/autoload.php';