У меня возникли проблемы с mindbodyonline API, пока я запускаю API CHECKOUT Shoping CART,
Вот мой код API
$mbResult = $mb->CheckoutShoppingCart(array(
'Test' => false, // Here
'ClientID' => 100015377,
// 'CartID' => 123,
'InStore' => true,
'SendEmail' => true,
'CartItems' => array(
'CartItem' => array(
'Quantity' => 1,
'Item' => new SoapVar(
array('ID' => '1357'), SOAP_ENC_ARRAY, 'Service', 'http://clients.mindbodyonline.com/api/0_5'
),
'DiscountAmount' => 0
)
),
'Payments' => array(
'PaymentInfo' => new SoapVar(
array(
'CreditCardNumber' => '4111111111111111',
'ExpYear' => '2016',
'ExpMonth' => '06',
'Amount' => '131',
'BillingAddress' => '123 Happy Ln',
'BillingPostalCode' => '93405',
"ID" => 21
), SOAP_ENC_ARRAY, 'CreditCardInfo', 'http://clients.mindbodyonline.com/api/0_5'
)
)
));
Получение этого ответа от API
SAOP Ответ:
stdClass Object
(
[CheckoutShoppingCartResult] => stdClass Object
(
[Status] => InvalidParameters
[ErrorCode] => 9999
[Message] => Card Authorization Failed DECLINED:1000410001:Invalid merchant:
[XMLDetail] => Full
[ResultCount] => 0
[CurrentPageIndex] => 0
[TotalPageCount] => 0
)
)
Всякий раз, когда я использую тестовый режим, верно прокомментировано выше, я получаю SOAP-ответ:
stdClass Object
(
[CheckoutShoppingCartResult] => stdClass Object
(
[Status] => Success
[ErrorCode] => 200
[XMLDetail] => Full
[ResultCount] => 0
[CurrentPageIndex] => 0
[TotalPageCount] => 0
[ShoppingCart] => stdClass Object
(
[ID] => cbae7ca5-5b1b-46b8-ab82-e8fee591e238
[CartItems] => stdClass Object
(
[CartItem] => stdClass Object
(
[Item] => stdClass Object
(
[Price] => 130.0000
[OnlinePrice] => 130.0000
[TaxRate] => 0
[ProductID] => 1357
[ID] => 123456789
[Name] => 1 Month Unlimited
[Count] => 99999
)
[DiscountAmount] => 0
[ID] => 1
[Quantity] => 1
)
)
[SubTotal] => 130
[DiscountTotal] => 0
[TaxTotal] => 0
[GrandTotal] => 130
)
)
)
Но купленный сервис показывается в mindbodyonline песочнице аккаунта.
Любая помощь будет заметна.
Спасибо
$mindb = new MINDBODY_API();
print_r($mindb->GetClientContracts(array('ClientID'=>100000528)));
$checkout = $mindb->checkoutShoppingCart(
array( 'ClientID' => 100000528,
'CartID' => 124,
'InStore' => true,
'Test' => true, // Here
'SendEmail' => true,
'CartItems' => array(
'CartItem' => array(
'Quantity' => 1,
'Item' => new SoapVar(
array('ID' => 124), SOAP_ENC_ARRAY, 'Service', 'http://clients.mindbodyonline.com/api/0_5'
),
'DiscountAmount' => 0
)
),
'Payments' => array(
'PaymentInfo' => new SoapVar(
array(
'CreditCardNumber' => '4242424242424242',
'ExpYear' => '2019',
'ExpMonth' => '03',
'Amount' => 0,
'BillingAddress' => 'indore',
'BillingPostalCode' => '93401',
'BillingCity'=>'indore',
'BillingState'=>'CA',
'BillingName'=>'Amin321 Aminkhanb321',
//'ID'=>205
), SOAP_ENC_ARRAY, 'CreditCardInfo', 'http://clients.mindbodyonline.com/api/0_5'
)
)
));
print_r($checkout);
Других решений пока нет …