简体   繁体   English

在我的沙箱帐户的仪表板中显示订单的过程是什么?

[英]What is the process to show orders in the dashboard of my sandbox account?

I'm working with sandbox enviroment and I can't see the orders created from my code. 我正在使用沙盒环境,但看不到从代码创建的订单。

I have the next process: 我有下一个过程:

  1. First in the android app I have the "In-App Payments SDK" this returns me a nonce 首先,在android应用中,我拥有“应用内付款SDK”,这使我得到了一个随机数

  2. Then I sent that nonce to a webservice in php (here i'm using this https://github.com/square/connect-php-sdk ) 然后,我将该随机数发送到php中的Web服务(在这里,我正在使用此https://github.com/square/connect-php-sdk

  3. Then inside my php server I create an order with one "line item ad hoc" it returns me a orderid 然后在我的php服务器中,我创建一个带有“临时订单项”的订单,它向我返回一个orderid

  4. After that I create payment sending the nonce and the orderid 之后,我创建付款,发送随机数和订单号

  5. And That' all 那就是全部

  6. the code in my android app is the same as the quickstart example 我的android应用中的代码与quickstart示例相同

2.the code to create orders is: 2.创建订单的代码是:

$body->setIdempotencyKey('.....');
$item=new \SquareConnect\Model\OrderLineItem();
$item->setName('test hamburger');
$item->setQuantity('1');
$money=new \SquareConnect\Model\Money();
$money->setAmount(1);
$money->setCurrency('USD');
$item->setBasePriceMoney($money);

$body->setLineItems([$item]);
$result = $apiInstance->createOrder($location_id, $body);
  1. my code to create the payment is : 我创建付款的代码是:
$body->setAutocomplete(true);
$money=new \SquareConnect\Model\Money();
$money->setAmount(1);
$money->setCurrency('USD');
$body->setAmountMoney($money);
$body->setSourceId('NONCE I GOT from android');
$body->setOrderId('ORDERID I GOT FROM #2');
$result = $apiInstance->createPayment($body);

When I launch the "Default Test Account" I'm able to see the deposits and the transactions but when I go to the Orders it's empty. 当我启动“默认测试帐户”时,我可以看到存款和交易,但是当我转到“订单”时,它是空的。

so why my orders are not shown under the orders page ( https://squareupsandbox.com/dashboard/orders/overview )? 那么为什么我的订单没有显示在订单页面( https://squareupsandbox.com/dashboard/orders/overview )下?

Am I doing something wrong? 难道我做错了什么? is it supported in sandox? Sandox支持吗?

Thanks Regards 感谢和问候

In order to view orders in Sandbox or in Production you have to include fulfillments : https://developer.squareup.com/docs/orders-api/create-orders#add-fulfillment-details 为了在Sandbox或Production中查看订单,您必须包括fulfillmentshttps : //developer.squareup.com/docs/orders-api/create-orders#add-fulfillment-details

If there's no fulfillment details, then the order will not be displayed on your dashboard and is only retrievable via the API. 如果没有履行详细信息,那么该订单将不会显示在您的仪表板上,只能通过API检索。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM