Closed gothub closed 3 years ago
The quota name is not being relayed from an order 'name' field to the quota 'name' field when an order is payed. For example, create an order using this JSON document:
{ "object": "order", "customer": 1, "status": "created", "amount": 1, "items": [{ "object": "order_item", "name": "OPC Order # 1", "amount": 200000, "type": "sku", "parent": 2, "quantity": 1 }], "name": "OPC Order # 1", "subject":"membership-090E3A1B-9E79-4CC5-964B-2598EEEBFC8C", "seriesId": "E3F7D9F1-D669-42BF-A399-76FF566A455A" }
which will result in the following order entry:
id | object | amount | amountreturned | charge | created | currency | customer | subject | email | items | metadata | name | status | statustransitions | updated | seriesid | startdate | enddate ----+--------+--------+----------------+--------+------------------------+----------+----------+-------------------------------------------------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+---------------+--------+----------------------------------------------+------------------------+--------------------------------------+------------------------+------------------------ 5 | order | 200000 | 0 | {} | 2020-10-12 18:34:40+00 | | 1 | membership-090E3A1B-9E79-4CC5-964B-2598EEEBFC8C | | [{"object":"order_item","amount":200000,"currency":"USD","description":"DataONE Membership Plan - Small Organization","parent":2,"quantity":1,"type":"sku"}] | {} | OPC Order # 1 | paid | {"created":1602527680,"trialing":1602527766} | 2020-10-12 18:36:06+00 | E3F7D9F1-D669-42BF-A399-76FF566A455A | 2020-10-12 18:36:06+00 | 2021-04-10 18:36:06+00 (1 row)
Next, pay the order and the following quota will be created:
id | object | quotatype | softlimit | hardlimit | totalusage | unit | orderid | subject | name ----+--------+-----------+-----------+-----------+------------+--------+---------+-------------------------------------------------+------ 8 | quota | portal | 5 | 5 | | portal | 5 | membership-090E3A1B-9E79-4CC5-964B-2598EEEBFC8C | (
Notice that the 'name' field is not filled in. Is this an error in the request or in the processing?
Thanks @gothub Working on it now
This is fixed and tested locally. Closing for now, but reopen this if you see issues.
The quota name is not being relayed from an order 'name' field to the quota 'name' field when an order is payed. For example, create an order using this JSON document:
which will result in the following order entry:
Next, pay the order and the following quota will be created:
Notice that the 'name' field is not filled in. Is this an error in the request or in the processing?