{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["sub-heading","admonition"]},"type":"markdown"},"seo":{"title":"Testing","description":"Transform your commerce with PXP's unified platform—seamless payments, real-time insights, and global growth in one powerful integration.","lang":"en-UK","siteUrl":"https://developer.pxp.io","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"testing","__idx":0},"children":["Testing"]},{"$$mdtype":"Tag","name":"SubHeading","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Test your Aeropay integration before accepting live payments or payouts."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"overview","__idx":1},"children":["Overview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Test the complete Aeropay journey, including component configuration, new and returning shoppers, OTP verification, bank linking, every supported intent, transaction failures, and backend verification."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Environment.TEST"]}," with UAT credentials and test data. Don't use production Aeropay credentials, real bank accounts, or real shopper data during development."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Get approved UAT users, OTP behaviour, bank account scenarios, and expected provider responses from your PXP or Aeropay integration contact."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"test-environment","__idx":2},"children":["Test environment"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Initialise the SDK with a UAT session and matching test transaction data:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"import com.pxp.checkout.models.AeropayIntentType\nimport com.pxp.checkout.models.EntryType\nimport com.pxp.checkout.models.Environment\nimport com.pxp.checkout.models.PxpSdkConfig\nimport com.pxp.checkout.models.TransactionData\nimport com.pxp.checkout.models.TransactionIntentData\nimport com.pxp.checkout.services.models.transaction.Shopper\nimport java.time.Instant\n\nval sdkConfig = PxpSdkConfig(\n    environment = Environment.TEST,\n    session = mapToSessionConfig(sessionResult), // SessionConfig, not the raw API model\n    transactionData = TransactionData(\n        amount = 10.00,\n        currency = \"USD\",\n        entryType = EntryType.Ecom,\n        intent = TransactionIntentData(aeropay = AeropayIntentType.Authorisation),\n        merchant = \"your-merchant-id\",\n        merchantTransactionId = sessionResult.merchantTransactionId,\n        merchantTransactionDate = { Instant.now().toString() },\n    ),\n    clientId = \"your-client-id\",\n    ownerType = \"MerchantGroup\",\n    ownerId = \"MERCHANT_GROUP_1\",\n    onGetShopper = {\n        Shopper(\n            id = \"test-shopper-1\",\n            firstName = \"Test\",\n            lastName = \"Shopper\",\n            email = \"test.shopper@example.com\",\n            phoneNumber = \"+14155550123\",\n        )\n    },\n    analyticsEvent = { event ->\n        // Log event.eventName only. Don't log personal or bank data.\n    },\n)\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use environment settings consistently:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"SDK environment"},"children":["SDK environment"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Aeropay and Aerosync configuration"},"children":["Aeropay and Aerosync configuration"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Purpose"},"children":["Purpose"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Environment.TEST"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["UAT or sandbox configuration (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SANDBOX"]},")"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Development, automated testing, and UAT"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Environment.LIVE"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Production configuration (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PROD"]},")"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Live payments and payouts"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Confirm which credentials and test identities apply to each environment before testing."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"add-diagnostic-callbacks","__idx":3},"children":["Add diagnostic callbacks"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use callbacks to trace the flow without logging personal or bank data:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"val config = AeropayButtonComponentConfig().apply {\n    onClick = {\n        // Button tapped\n    }\n    onCustomValidation = {\n        true\n    }\n    onUserVerificationSuccess = {\n        // User verified\n    }\n    onCancel = {\n        // Popup dismissed\n    }\n    onPreAuthorisation = {\n        true\n    }\n    onPostAuthorisation = { result ->\n        // Log only that a result was received\n    }\n    onSubmitError = { error ->\n        // Log FailedSubmitResult.errorCode and correlationId only\n    }\n    onError = { error ->\n        // Log error.errorCode and a redacted message\n    }\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Don't log shopper details, OTPs, Aeropay user IDs, bank account IDs, credentials, or complete provider responses."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"configuration-tests","__idx":4},"children":["Configuration tests"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Test each required configuration rule before testing the shopper flow:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Scenario"},"children":["Scenario"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Expected result"},"children":["Expected result"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Valid Aeropay-enabled session"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The component is created and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Content()"]}," renders the button."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Missing ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["externalMerchantId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["createComponent()"]}," throws ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SDK0113"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Missing ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["configurationId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["createComponent()"]}," throws ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SDK0113"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Missing Aeropay intent"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["createComponent()"]}," throws ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SDK0115"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Entry type other than ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Ecom"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["createComponent()"]}," throws ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SDK0114"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Currency other than ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["USD"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["createComponent()"]}," throws ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SDK0116"]},"."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For example, confirm that an unsupported currency fails during component creation. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["createCheckoutWithCurrency"]}," is a test helper that builds a new ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PxpCheckout"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionData.currency = \"GBP\""]}," and an otherwise valid Aeropay session and intent:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"import com.pxp.checkout.exceptions.BaseSdkException\nimport com.pxp.checkout.types.ComponentType\nimport com.pxp.checkout.components.aeropaybutton.types.AeropayButtonComponentConfig\n\nval invalidCheckout = createCheckoutWithCurrency(\"GBP\")\n\ntry {\n    invalidCheckout.createComponent(\n        ComponentType.AERO_PAY_BUTTON,\n        AeropayButtonComponentConfig().apply {\n            onPreAuthorisation = { true }\n        },\n    )\n} catch (error: BaseSdkException) {\n    // Expected: error.errorCode == \"SDK0116\"\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"component-tests","__idx":5},"children":["Component tests"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Verify basic button behaviour:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The Aeropay presentation and default payment label render."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The payout label renders when the intent is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Payout"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Custom ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["label"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["styles"]}," values are applied."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Disabled and loading states remain readable."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["disabled = true"]}," on the config before creation, or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["setDisabled(true)"]}," after creation, prevents the flow from starting."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onCustomValidation"]}," returning ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}," keeps the popup closed after ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onClick"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["After changing ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["component"]}," config (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AeropayButtonComponentConfig"]},"), call ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["clearStateComponents()"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["unmount()"]}," on the same ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PxpCheckout"]},", then ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["createComponent()"]}," again. After changing ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["SDK"]}," config (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PxpSdkConfig"]}," session, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionData"]},", or environment), build a new ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PxpCheckout"]}," with the updated config, then create the component. Keep only one Aeropay component reference in your UI."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Test the button on phone and tablet layouts in portrait and landscape."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"new-shopper-tests","__idx":6},"children":["New-shopper tests"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"no-prefilled-data","__idx":7},"children":["No prefilled data"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Omit ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onGetShopper"]}," or return only a shopper ID. Confirm that:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The consumer data screen opens with empty fields."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["All four fields are required."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Inline errors appear for empty or invalid values."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Valid data advances to OTP verification."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Successful OTP verification calls ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onUserVerificationSuccess"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Bank selection opens after verification."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"partial-prefilled-data","__idx":8},"children":["Partial prefilled data"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Return some consumer fields:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"onGetShopper = {\n    Shopper(\n        id = \"test-shopper-2\",\n        firstName = \"Test\",\n        email = \"test.shopper@example.com\",\n    )\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Confirm that provided fields are prefilled and read-only unless listed in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["editableFields"]},", while missing fields remain empty for the shopper to complete."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"editable-prefilled-data","__idx":9},"children":["Editable prefilled data"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Make selected fields editable:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"val config = AeropayButtonComponentConfig().apply {\n    consumerDataCollectionConfig = ConsumerDataCollectionConfig(\n        editableFields = listOf(ConsumerDataField.EMAIL),\n    )\n    onPreAuthorisation = { true }\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Confirm that only the configured fields can be changed and that edited values still receive validation."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"skip-consumer-data-collection","__idx":10},"children":["Skip consumer data collection"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Return all four valid consumer fields and set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["skipConsumerDataCollection"]}," to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"val config = AeropayButtonComponentConfig().apply {\n    skipConsumerDataCollection = true\n    onPreAuthorisation = { true }\n}\n","lang":"kotlin"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Confirm that the SDK creates the user in the background and opens OTP verification directly."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Also test that the data screen still appears when:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A required field is missing or empty."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["consumerDataCollectionConfig.editableFields"]}," contains a value."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If a supplied field is invalid, confirm that ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onError"]}," receives ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SDK1300"]}," and the popup doesn't open."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"consumer-data-tests","__idx":11},"children":["Consumer data tests"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Test valid, missing, boundary, and invalid values:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Valid examples"},"children":["Valid examples"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Invalid or boundary examples"},"children":["Invalid or boundary examples"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["First name"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Test"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["María"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Test User"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Empty, more than 100 characters, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Test-User"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Test2"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Last name"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Shopper"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["García"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Test Shopper"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Empty, more than 100 characters, ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["O'Neil"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Shopper2"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Email"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["test@example.com"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Empty, missing ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["@"]},", missing domain dot, whitespace, more than 128 characters"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Phone number from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onGetShopper"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["+14155550123"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Empty when skipping, missing ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["+1"]},", too few or too many digits, formatting characters"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Phone number entered in the form"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["4155550123"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Empty, fewer or more than 10 digits"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The current name rules accept Unicode letters and spaces only. Test real customer-name patterns against this limitation before launch."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"otp-tests","__idx":12},"children":["OTP tests"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Test the OTP screen with provider-approved UAT scenarios:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Confirm that verification remains unavailable until all six-digit cells contain a value."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Confirm that typed or pasted non-digit characters are filtered out."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Test an incorrect six-digit code."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Test a correct six-digit code."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Test a network failure during verification or resend."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Try to resend while the countdown is active."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Resend successfully after the countdown."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Confirm that provider verification failures call ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onError"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SDK1302"]},", including provider code ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AP112"]}," if your UAT setup returns it."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"bank-selection-and-aerosync-tests","__idx":13},"children":["Bank selection and Aerosync tests"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Test bank account loading, selection, and linking:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"width":"40%","data-label":"Scenario"},"children":["Scenario "]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Expected result"},"children":["Expected result"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["One or more linked accounts"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Accounts load and the shopper can select an account."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No linked accounts"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The component shows the empty state and offers bank linking for payment flows."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Successful bank linking"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Aerosync completes, the account is linked, and the bank list refreshes."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Failed bank linking"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onError"]}," receives an Aerosync or link-account failure code."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Payout with default settings"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Link-bank is hidden."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Payout with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["allowLinkBankOnPayout = true"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Link-bank is available."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Verify end-to-end bank linking in UAT: completing Aerosync returns to checkout and refreshes linked accounts. The SDK handles ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pxpcheckout://aerosync/callback"]}," through the library manifest; merchants don't register this URI themselves."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"returning-shopper-tests","__idx":14},"children":["Returning-shopper tests"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Pass a stored Aeropay user ID and confirm that:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Consumer data and OTP screens are skipped."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Bank selection opens after user lookup."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["An inactive user calls ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onError"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SDK1307"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A failed user lookup from a recognised API error calls ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onError"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SDK1308"]},". Network or transport failures use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SDK0500"]}," instead."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Your app can clear the stored ID and restart the new-shopper flow."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"intent-and-transaction-tests","__idx":15},"children":["Intent and transaction tests"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Run end-to-end tests for each supported intent:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorisation"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Purchase"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["EstimatedAuthorisation"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Payout"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For each intent, confirm:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPreAuthorisation"]}," returning ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}," stops submission. The popup stays open and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onSubmitError"]}," isn't called."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Omitting ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPreAuthorisation"]}," also stops submission. The popup stays open and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onSubmitError"]}," isn't called. Plain ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{ true }"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{ false }"]}," lambdas are fine when the callback doesn't call suspend functions."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["When ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPostAuthorisation"]}," is configured, successful submission invokes it. Submission can still succeed when ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPostAuthorisation"]}," is omitted (unlike ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onPreAuthorisation"]},", which must be set and return ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]},")."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Failed submission calls ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onSubmitError"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Your backend verification accepts only authoritative PXP transaction data."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"cancellation-tests","__idx":16},"children":["Cancellation tests"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Confirm that dismissing the popup with the close control or system back or scrim calls ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onCancel"]},", and that a successful payment dismissal doesn't."]}]},"headings":[{"value":"Testing","id":"testing","depth":1},{"value":"Overview","id":"overview","depth":2},{"value":"Test environment","id":"test-environment","depth":2},{"value":"Add diagnostic callbacks","id":"add-diagnostic-callbacks","depth":2},{"value":"Configuration tests","id":"configuration-tests","depth":2},{"value":"Component tests","id":"component-tests","depth":2},{"value":"New-shopper tests","id":"new-shopper-tests","depth":2},{"value":"No prefilled data","id":"no-prefilled-data","depth":3},{"value":"Partial prefilled data","id":"partial-prefilled-data","depth":3},{"value":"Editable prefilled data","id":"editable-prefilled-data","depth":3},{"value":"Skip consumer data collection","id":"skip-consumer-data-collection","depth":3},{"value":"Consumer data tests","id":"consumer-data-tests","depth":2},{"value":"OTP tests","id":"otp-tests","depth":2},{"value":"Bank selection and Aerosync tests","id":"bank-selection-and-aerosync-tests","depth":2},{"value":"Returning-shopper tests","id":"returning-shopper-tests","depth":2},{"value":"Intent and transaction tests","id":"intent-and-transaction-tests","depth":2},{"value":"Cancellation tests","id":"cancellation-tests","depth":2}],"frontmatter":{"seo":{"title":"Testing"}},"lastModified":"2026-08-13T10:57:11.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/checkout/components/android/aeropay/testing","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}