Purchase API returning "Confirmation method must be sms or http"


#1

Purchase API returning “Confirmation method must be sms or http” even after skipping confirm param.
Tried including confirm param as well but returning same response.

I’m able to add product to cart and get success status.
I’m using following code with php package (Passing tokens as well).

$cartId = ‘5acc8b67168767127xxxxxxx’;
$fieldsInput = [
“SITE_ID” => [
“noauthCheckout” => [
“email” => "shopper@gmail.com",
“shipping_telephone” => “6503941234”,
“shipping_zip” => “94303”,
“shipping_state” => “California”,
“shipping_city” => “Palo Alto”,
“shipping_address” => “555 Palo Alto Avenue”
],
“addToCart” => [
“[product_md5]” => [
“quantity” => 1
]
]
]
];
$confirm = [
“confirm” => [
“method” => “http”,
“http_confirm_url” => “test/test.php”,
“http_update_url” => “test/test.php”
]
];
$products = [
http://twotapstore.com/crinkled-satin-halter-dress/
];
$testMode = “fake_confirm”;

$response = $api->purchase()->create($cartId, $fieldsInput, $confirm, $products, $testMode);

Response : object(stdClass)#33 (2) { [“message”]=> string(6) “failed” [“description”]=> string(39) “Confirmation method must be sms or http” }

Please help me to get it through.