2015-11-02 10 views
1

我得到在mindbodyonline API一些问题,虽然intigrating结帐街上购物车API,Mindbodyonline Checkoutshoppingcart API

这是我的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 
       ) 

     ) 

) 

但购买的服务显示在脑海中的沙箱帐户。

任何一个都有帮助。

感谢

+0

您可能想通过添加一个实际的问题,以提高你的问题,和更多的细节。此外,似乎这个问题将有更多的机会由特定提供商的支持来回答,如果存在的话。 – SirDarius

+0

我已经更新了我的问题,请审查并提出建议。 –

回答

0
$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);