#monesh_sahu
1 messages · Page 1 of 1 (latest)
com.stripe.android.core.exception.PermissionException: Only Stripe Connect platforms can work with other accounts. If you specified a client_id parameter, make sure it's correct. If you need to setup a Stripe Connect platform,
getting this error in android
could you share the code please?
or the request ID? https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
<?php
namespace App\Http\Controllers\V1\API;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Stripe\PaymentIntent;
use Stripe\Stripe;
require_once '../vendor/autoload.php';
class StripeController extends Controller
{
protected $stripe;
public function __construct()
{
$this->stripe = \Stripe\Stripe::setApiKey(env("STRIPE_SECRET_KEY"));
}
public function createIntent(Request $request)
{
header('Content-Type: application/json');
$params = [
'price' => $request->input('price'),
];
try {
// Create a PaymentIntent with amount and currency
$paymentIntent = \Stripe\PaymentIntent::create([
'amount' => $params['price']*100,
'currency' => 'USD',
'automatic_payment_methods' => [
'enabled' => true,
],
]);
$output = [
'clientSecret' => $paymentIntent->client_secret,
];
return response()->json($output);
} catch (Error $e) {
http_response_code(500);
return response()->json(['error' => $e->getMessage()]);
}
}
public function paymentSuccess(Request $request)
{
//
}
public function failedPayment(Request $request)
{
//
}
}
this is my controller looks like
let me take a look
taking a look
the code on your PHP end is working fine
the problem is in the mobile
could you share that code please?
yes wait i will share