< Return to Summary | File Generated: Tue Apr 16 2024 12:03:38 GMT+0000 (Coordinated Universal Time)

payment-reconciliation-detail-validation >> payment-reconciliation-detail-validation-incorrect-details (OpenBookingSimpleFlow >> ScheduledSession)

Booking Flow: OpenBookingSimpleFlow

Opportunity Type: ScheduledSession

Feature: Payment / Payment reconciliation detail validation (Implemented)

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

B should return an InvalidPaymentDetailsError due to incorrect reconciliation data

Running only this test

npm start -- --runInBand test/features/payment/payment-reconciliation-detail-validation/implemented/payment-reconciliation-detail-validation-incorrect-details-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, 29 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#TestOpportunityBookableUsingPayment",
  "test:testOpenBookingFlow": "https://openactive.io/test-interface#OpenBookingSimpleFlow"
}

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

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

Opportunity Feed extract for OrderItem 0 Request

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


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

{
  "data": {
    "@context": [
      "https://openactive.io/"
    ],
    "@type": "ScheduledSession",
    "@id": "https://localhost:5001/api/identifiers/scheduled-sessions/152/events/1512",
    "startDate": "2024-04-24T02:49:46+00:00",
    "endDate": "2024-04-24T07:32:46+00:00",
    "superEvent": {
      "@type": "SessionSeries",
      "@id": "https://localhost:5001/api/identifiers/session-series/152",
      "identifier": 152,
      "name": "Granite Zumba",
      "activity": [
        {
          "@type": "Concept",
          "@id": "https://openactive.io/activity-list#78503fa2-ed24-4a80-a224-e2e94581d8a8",
          "inScheme": "https://openactive.io/activity-list",
          "prefLabel": "Zumba®"
        }
      ],
      "eventAttendanceMode": "https://schema.org/OnlineEventAttendanceMode",
      "offers": [
        {
          "@type": "Offer",
          "@id": "https://localhost:5001/api/identifiers/session-series/152#/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": false,
          "latestCancellationBeforeStartDate": "P1D",
          "price": 5.4,
          "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": "08306 732115",
        "termsOfService": [
          {
            "@type": "PrivacyPolicy",
            "name": "Privacy Policy",
            "requiresExplicitConsent": false,
            "url": "https://example.com/privacy.html"
          }
        ],
        "url": "http://adriana.com"
      },
      "url": "https://www.example.com/sessions/152"
    },
    "duration": "PT4H43M",
    "maximumAttendeeCapacity": 29,
    "remainingAttendeeCapacity": 29
  }
}

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/dc3c1443-d9bf-432d-ac7d-d983841be788

{
  "@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/152#/offers/0",
      "orderedItem": "https://localhost:5001/api/identifiers/scheduled-sessions/152/events/1512"
    }
  ],
  "payment": {
    "@type": "Payment",
    "name": "invalid-zejs9BfqVS",
    "accountId": "invalid-zlWMz4CIh",
    "paymentProviderId": "invalid-v0EnS9Rsj1"
  }
}

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

{
  "@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/dc3c1443-d9bf-432d-ac7d-d983841be788

{
  "@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": "(806) 317-0845 x99063",
    "givenName": "Schroeder",
    "familyName": "Abdullah"
  },
  "orderedItem": [
    {
      "@type": "OrderItem",
      "position": 0,
      "acceptedOffer": "https://localhost:5001/api/identifiers/session-series/152#/offers/0",
      "orderedItem": "https://localhost:5001/api/identifiers/scheduled-sessions/152/events/1512"
    }
  ],
  "payment": {
    "@type": "Payment",
    "name": "invalid-tz5dnaFXdw",
    "accountId": "invalid-OvugIOgWp",
    "paymentProviderId": "invalid-SwPFH6zJdc"
  }
}

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

{
  "@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