< Return to Summary | File Generated: Thu Mar 28 2024 12:32:36 GMT+0000 (Coordinated Universal Time)

payment-reconciliation-detail-validation >> payment-reconciliation-detail-validation-missing-details-no-payment-required (OpenBookingSimpleFlow >> ScheduledSession)

Booking Flow: OpenBookingSimpleFlow

Opportunity Type: ScheduledSession

Feature: Payment / Payment reconciliation detail validation (Implemented)

Test: Payment reconciliation detail validation - missing reconciliation details, when no payment required

B should return an InvalidPaymentDetailsError due to missing reconciliation data

Running only this test

npm start -- --runInBand test/features/payment/payment-reconciliation-detail-validation/implemented/payment-reconciliation-detail-validation-missing-details-no-payment-required-test.js

Is this test failing?

The OpenActive Reference Implementation test result for this test can be used as a reference to help with debugging.


⚠️ 7 passed with 0 failures, 35 warnings and 18 suggestions


✅ Fetch Opportunities

Local Microservice Test Interface for OrderItem 0 Request

POST http://localhost:3000/test-interface/datasets/uat-ci/opportunities

{
  "@type": "ScheduledSession",
  "superEvent": {
    "@type": "SessionSeries",
    "organizer": {
      "@type": "Organization",
      "@id": "https://localhost:5001/api/identifiers/sellers/1"
    }
  },
  "@context": [
    "https://openactive.io/",
    "https://openactive.io/test-interface"
  ],
  "test:testOpportunityCriteria": "https://openactive.io/test-interface#TestOpportunityBookableFree",
  "test:testOpenBookingFlow": "https://openactive.io/test-interface#OpenBookingSimpleFlow"
}

Response status code: 200 OK. Responded in 33.603483ms.

{
  "@context": "https://openactive.io/",
  "@type": "ScheduledSession",
  "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/257/events/2561"
}

Opportunity Feed extract for OrderItem 0 Request

GET http://localhost:3000/opportunity/https%3A%2F%2Flocalhost%3A5001%2Fapi%2Fidentifiers%2Fscheduled-sessions%2F257%2Fevents%2F2561?useCacheIfAvailable=true


Response status code: 200 OK. Responded in 23.032547ms.

{
  "data": {
    "@context": [
      "https://openactive.io/"
    ],
    "@type": "ScheduledSession",
    "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/257/events/2561",
    "startDate": "2024-04-06T07:37:32+00:00",
    "endDate": "2024-04-06T11:41:32+00:00",
    "superEvent": {
      "@type": "SessionSeries",
      "@id": "https://localhost:5001/api/identifiers/session-series/257",
      "identifier": 257,
      "name": "GOLDEN: Fresh Jumping",
      "activity": [
        {
          "@type": "Concept",
          "@id": "https://openactive.io/activity-list#8a4abff3-c616-4f33-80a1-398b88c672a3",
          "inScheme": "https://openactive.io/activity-list",
          "prefLabel": "World Jumping®"
        }
      ],
      "eventAttendanceMode": "https://schema.org/OnlineEventAttendanceMode",
      "offers": [
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/257#/offers/0",
          "name": "Adult",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Adult",
            "maxValue": 59,
            "minValue": 18
          },
          "allowCustomerCancellationFullRefund": true,
          "latestCancellationBeforeStartDate": "P1DT16H",
          "openBookingPrepayment": "https://openactive.io/Unavailable",
          "price": 0,
          "priceCurrency": "GBP"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/257#/offers/0",
          "name": "Junior",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Junior",
            "maxValue": 17
          },
          "allowCustomerCancellationFullRefund": true,
          "latestCancellationBeforeStartDate": "P1DT16H",
          "openBookingPrepayment": "https://openactive.io/Unavailable",
          "price": 0,
          "priceCurrency": "GBP"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/257#/offers/0",
          "name": "Senior",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Senior",
            "minValue": 60
          },
          "allowCustomerCancellationFullRefund": true,
          "latestCancellationBeforeStartDate": "P1DT16H",
          "openBookingPrepayment": "https://openactive.io/Unavailable",
          "price": 0,
          "priceCurrency": "GBP"
        },
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/257#/offers/0",
          "name": "Adult (off-peak)",
          "acceptedPaymentMethod": [
            "http://purl.org/goodrelations/v1#Cash",
            "http://purl.org/goodrelations/v1#PaymentMethodCreditCard"
          ],
          "ageRestriction": {
            "@type": "QuantitativeValue",
            "name": "Adult (off-peak)",
            "maxValue": 59,
            "minValue": 18
          },
          "allowCustomerCancellationFullRefund": true,
          "latestCancellationBeforeStartDate": "P1DT16H",
          "openBookingPrepayment": "https://openactive.io/Unavailable",
          "price": 0,
          "priceCurrency": "GBP"
        }
      ],
      "organizer": {
        "@type": "Organization",
        "@id": "https://localhost:5001/api/identifiers/sellers/1",
        "name": "Acme Fitness Ltd",
        "isOpenBookingAllowed": true,
        "sameAs": [
          "https://socialmedia.com/AcmeFitnessLtd"
        ],
        "taxMode": "https://openactive.io/TaxGross",
        "telephone": "02103 706131",
        "termsOfService": [
          {
            "@type": "PrivacyPolicy",
            "name": "Privacy Policy",
            "requiresExplicitConsent": false,
            "url": "https://example.com/privacy.html"
          }
        ],
        "url": "http://hadley.info"
      },
      "url": "https://www.example.com/sessions/257"
    },
    "duration": "PT4H4M",
    "maximumAttendeeCapacity": 20,
    "remainingAttendeeCapacity": 20
  }
}

Specs

✅ Fetch Opportunities >> validation of Opportunity Feed extract for OrderItem 0

Specs

Validations

❔ C1

C1 Request

PUT https://localhost:5001/api/openbooking/order-quote-templates/ee222d9d-97da-489f-bc5a-1973d8363a5b

{
  "@context": "https://openactive.io/",
  "@type": "OrderQuote",
  "brokerRole": "https://openactive.io/AgentBroker",
  "broker": {
    "@type": "Organization",
    "name": "MyFitnessApp",
    "url": "https://myfitnessapp.example.com",
    "description": "A fitness app for all the community",
    "logo": {
      "@type": "ImageObject",
      "url": "http://data.myfitnessapp.org.uk/images/logo.png"
    },
    "address": {
      "@type": "PostalAddress",
      "streetAddress": "Alan Peacock Way",
      "addressLocality": "Village East",
      "addressRegion": "Middlesbrough",
      "postalCode": "TS4 3AE",
      "addressCountry": "GB"
    }
  },
  "seller": "https://localhost:5001/api/identifiers/sellers/1",
  "orderedItem": [
    {
      "@type": "OrderItem",
      "position": 0,
      "acceptedOffer": "https://localhost:5001/api/identifiers/session-series/257#/offers/0",
      "orderedItem": "https://localhost:5001/api/identifiers/scheduled-sessions/257/events/2561"
    }
  ],
  "payment": {
    "@type": "Payment"
  }
}

Response status code: 400 Bad Request. Responded in 44.770915ms.

{
  "@context": "https://openactive.io/",
  "@type": "InvalidPaymentDetailsError",
  "name": "The 'payment' property of the 'OrderQuote' or 'Order' contains data that is not accepted by the Booking System for reconciliation, e.g. an invalid 'accountId'.",
  "statusCode": 400,
  "description": "Payment reconciliation details do not match"
}

✅ C1 >> validation of C1

Specs

Validations

✅ Assert Opportunity Capacity (after C1)

Specs

✅ Assert Opportunity Capacity (after C1) >> validation of Opportunity Feed extract for OrderItem 0

Specs

Validations

❔ C2

C2 Request

PUT https://localhost:5001/api/openbooking/order-quotes/ee222d9d-97da-489f-bc5a-1973d8363a5b

{
  "@context": "https://openactive.io/",
  "@type": "OrderQuote",
  "brokerRole": "https://openactive.io/AgentBroker",
  "broker": {
    "@type": "Organization",
    "name": "MyFitnessApp",
    "url": "https://myfitnessapp.example.com",
    "description": "A fitness app for all the community",
    "logo": {
      "@type": "ImageObject",
      "url": "http://data.myfitnessapp.org.uk/images/logo.png"
    },
    "address": {
      "@type": "PostalAddress",
      "streetAddress": "Alan Peacock Way",
      "addressLocality": "Village East",
      "addressRegion": "Middlesbrough",
      "postalCode": "TS4 3AE",
      "addressCountry": "GB"
    }
  },
  "seller": "https://localhost:5001/api/identifiers/sellers/1",
  "customer": {
    "@type": "Person",
    "email": "[email protected]",
    "telephone": "554.215.0720 x4957",
    "familyName": "Leo",
    "identifier": "62966df0-21b7-4c94-b22b-e3bc2e0cb570"
  },
  "orderedItem": [
    {
      "@type": "OrderItem",
      "position": 0,
      "acceptedOffer": "https://localhost:5001/api/identifiers/session-series/257#/offers/0",
      "orderedItem": "https://localhost:5001/api/identifiers/scheduled-sessions/257/events/2561"
    }
  ],
  "payment": {
    "@type": "Payment"
  }
}

Response status code: 400 Bad Request. Responded in 106.602436ms.

{
  "@context": "https://openactive.io/",
  "@type": "InvalidPaymentDetailsError",
  "name": "The 'payment' property of the 'OrderQuote' or 'Order' contains data that is not accepted by the Booking System for reconciliation, e.g. an invalid 'accountId'.",
  "statusCode": 400,
  "description": "Payment reconciliation details do not match"
}

✅ C2 >> validation of C2

Specs

Validations

✅ Assert Opportunity Capacity (after C2)

Specs

✅ Assert Opportunity Capacity (after C2) >> validation of Opportunity Feed extract for OrderItem 0

Specs

Validations