question

vishalwesupply20 avatar image
vishalwesupply20 asked vishalwesupply20 edited

Getting blank(NULL) response on hostedcheckout's success url

1735026740925.png

Here is the Video link : https://www.awesomescreenshot.com/video/34941340?key=074f660aedd1fd99b859eff56a119c43


Below is the payload :

// Define the payload

$payload = [

"customer" => [

"email" => "victorjohn20@yopmail.com",

"firstName" => "Example",

"lastName" => "Customer",

"phoneNumber" => "555-555-0002"

],

"currency"=> "USD",

"shoppingCart" => [

"lineItems" => [

[

"name" => "Apple",

"unitQty" => 3, // Quantity

"price" => $this->convertToCloverPrice(2),

],

[

"name" => "Agua de Sandía",

"unitQty" => 1,

"price" => $this->convertToCloverPrice(4) // Price in cents ($4.99)

],

[

"name" => "Tax",

"unitQty" => 1,

"price" => $this->convertToCloverPrice(17),

],

[

"name" => "Shipping Charge",

"unitQty" => 1,

"price" => $this->convertToCloverPrice(3),

]

]

],

"redirectUrl" => "https://coherent-husky-golden.ngrok-free.app/clover/success", // Ensure this is correct

"cancelUrl" => "https://coherent-husky-golden.ngrok-free.app/clover/cancel"

];

$response = Http::withHeaders([

'X-Clover-Merchant-Id' => $merchantId,

'Authorization' => "Bearer {$accessToken}",

'Content-Type' => 'application/json',

])->post('https://apisandbox.dev.clover.com/invoicingcheckoutservice/v1/checkouts', $payload);

clover-hosted-iframe
1735026740925.png (33.6 KiB)
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community