#yohana2211

1 messages · Page 1 of 1 (latest)

mystic stoneBOT
turbid basin
#

Hi! Let me help you with this.

crude hamlet
#

let me check req. ID

#

req_c9iwrJfxTCiqMn

turbid basin
#

The request returns a JSON object, so it must pass through some wrapper in your app.

#

What's the URL you're calling here?

crude hamlet
#

No, I just utilze the function prepared by PHP SDK

#

May be i can give you a screenshot

turbid basin
#

Could you please share the piece of code where you do this?

crude hamlet
#

sure

#

$paymentIntent = PaymentIntent::create([
'amount' => ($amount*100),
'currency' => 'usd',
'automatic_payment_methods' => [
'enabled' => true,
],
'receipt_email' => "$email",
'description' => "$source product / service",
'shipping' => [
'name' => "$name",
'address' => [
'line1' => '',
]
],
'statement_descriptor' => "$source"
]);

    if (isset($paymentIntent->id)){
        return ['clientSecret' => $paymentIntent->client_secret];
    } else {
        return "Error";
    }
turbid basin
#

Could you please catch and print the error? I am convinced it's your app that wraps the error in HTML.