private function ContributionIatsTest::filliATSCryptogram in Webform CiviCRM Integration 8.5
Fill values for the iATS Cryptogram.
1 call to ContributionIatsTest::filliATSCryptogram()
- ContributionIatsTest::testSubmit1stPayContribution in tests/
src/ FunctionalJavascript/ ContributionIatsTest.php
File
- tests/
src/ FunctionalJavascript/ ContributionIatsTest.php, line 185
Class
- ContributionIatsTest
- Tests submitting a Webform with CiviCRM: Contribution with Line Items and Sales Tax
Namespace
Drupal\Tests\webform_civicrm\FunctionalJavascriptCode
private function filliATSCryptogram() {
$this
->htmlOutput();
$expYear = date('y') + 1;
// Wait for the credit card form to load in.
$this
->getSession()
->wait(5000);
$this
->getSession()
->switchToIFrame('firstpay-iframe');
$this
->assertSession()
->assertWaitOnAjaxRequest();
// $this->getSession()->getPage()->fillField('Cryptogram', 'cryptogram');
$this
->assertSession()
->waitForElementVisible('css', 'input[name="text-card-number"]');
$this
->getSession()
->getPage()
->fillField('text-card-number', '4222222222222220');
$this
->assertSession()
->assertWaitOnAjaxRequest();
$this
->getSession()
->getPage()
->fillField('text-cvv', '123');
$this
->assertSession()
->assertWaitOnAjaxRequest();
$this
->getSession()
->getPage()
->fillField('select-expiration-month', '11');
$this
->assertSession()
->assertWaitOnAjaxRequest();
$this
->getSession()
->getPage()
->fillField('select-expiration-year', $expYear);
$this
->assertSession()
->assertWaitOnAjaxRequest();
$this
->getSession()
->wait(5000);
$this
->getSession()
->switchToIFrame();
}