[
  {
    "id": "paid",
    "name": "Payment is authorised and captured, the order ships",
    "inputs": {
      "orderId": "SO-7",
      "amount": 59.9
    },
    "mocks": {
      "inventory-reserve": {
        "outputs": {
          "reservationId": "RES-7"
        }
      },
      "payment-authorise": {
        "outputs": {
          "authorised": true,
          "authorisationId": "AUTH-7"
        }
      },
      "payment-capture": {
        "outputs": {
          "paymentId": "PAY-7"
        }
      },
      "shipment-create": {
        "outputs": {
          "trackingNumber": "1Z7"
        }
      }
    },
    "expect": {
      "path": [
        "reserve-stock",
        "authorise-payment",
        "capture-payment",
        "create-shipment",
        "order-shipped"
      ],
      "variables": {
        "paymentId": "PAY-7",
        "trackingNumber": "1Z7"
      }
    }
  },
  {
    "id": "declined",
    "name": "A declined card releases the stock",
    "inputs": {
      "orderId": "SO-8",
      "amount": 59.9
    },
    "mocks": {
      "inventory-reserve": {
        "outputs": {
          "reservationId": "RES-8"
        }
      },
      "payment-authorise": {
        "outputs": {
          "authorised": false,
          "authorisationId": null
        }
      },
      "inventory-release": {},
      "customer-notify": {}
    },
    "expect": {
      "path": [
        "authorise-payment",
        "payment-declined",
        "on-payment-declined",
        "release-stock",
        "order-failed"
      ]
    }
  }
]
