@documents
@lambda_documents_payee
Feature: EUR Bank Details - Payoneer and Abacus Rejected

  @id_4h7a3148bf037faa99962ad2b74f25b99ccf1734e910cadbc475b25e8fb763gf
  Scenario: Eur Bank Details declined for Business Account and Personal Bank Account type
    Given an orchard employee label_6971 for documents
    Then I update abacus state table and delete Payoneer account 793236
    When I log in
    Then I can see that documents Banking & Tax Settings page works with whitelabel UK account name ORCHARD-UK-TEST_ACCOUNT
    Then I can see empty Bank Details
    And I add company details for Spain for Business Account account type
    Then I set valid phone number 600444***
    When I set email for Personal account
    Then I click next on Bank Details form
    When I add Personal bank account for Spain and EUR
    Then I submit the bank details form
    And I can see that status is changed to Bank details in review
    Given an orchard employee label_7123_admin_5 for abacus
    When I log in
    Then I can find account by account name and go to info tab ORCHARD-UK-TEST_ACCOUNT
    Then I update abacus_state table, action name banking_details_review to init
    Then I update abacus_state table, action name payment_eligibility to init
    Then I set bank details status as payoneer with webhook to notification
    And I can see that Payment details status is Received on
    And I can see that Payment details status is Bank details did not automatically pass Payoneer's KYC checks
    Then I compliance check reject Banking Details
    And I can see that Payment details status is KYC check failed because of Rejected upon request
    Given an orchard employee label_6971 for documents
    When I log in
    Then I can see that documents Banking & Tax Settings page works with whitelabel UK account name ORCHARD-UK-TEST_ACCOUNT
    And I can see that status is changed to We were unable to verify your payment information. Please reach out to banking-info@theorchard.com to understand what additional documentation may be required to verify your payment information.
    Then I click to edit bank details
    And I edit company name

  @id_7f6fb87db728091d40ff1c1ea920692c9615c17762a22c76079de3d7a25c486b
  Scenario: Bank Details rejected based on KYC check
    Given an orchard employee label_7123_admin_5 for abacus
    When I log in
    Then I can find account by account name and go to info tab ORCHARD-UK-TEST_ACCOUNT
    When I set bank details status as payoneer with webhook to approved
    Then I update abacus_state table, action name banking_details_review to init
    Then I update abacus_state table, action name payment_eligibility to init
    Then I set bank details status as payoneer with webhook to approved
    And I can see that Payment details status is Received on
    And I can see that Payment details status is Bank details have passed KYC checks
    And I can see that Payment details status is Review Bank Details
    Then I reject Banking Details
    And I can see that Payment details status is Rejected on
    And I can see that Payment details status is Note about rejection
    Given an orchard employee label_6971 for documents
    When I log in
    Then I can see that documents Banking & Tax Settings page works with whitelabel UK account name ORCHARD-UK-TEST_ACCOUNT
    And I can see that status is changed to Bank details rejected
    And I can see that status is changed to Please update your previously submitted bank details or email banking-info@theorchard.com with any questions.
    And I check notes expandable content
