Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AuthorizenetCc.php
Go to the documentation of this file.
1 <?php
8 
9 use Magento\Mtf\Client\Locator;
11 
16 {
22  private $authorizenetForm = [
23  "cc_number" => "//*[@id='authorizenet_directpost_cc_number']",
24  "cc_exp_month" => "//*[@id='authorizenet_directpost_expiration']",
25  "cc_exp_year" => "//*[@id='authorizenet_directpost_expiration_yr']",
26  "cc_cid" => "//*[@id='authorizenet_directpost_cc_cid']",
27  ];
28 
34  public function getCCNumber()
35  {
36  return $this->_rootElement->find($this->authorizenetForm['cc_number'], Locator::SELECTOR_XPATH)->getValue();
37  }
38 
44  public function getExpMonth()
45  {
46  return $this->_rootElement->find($this->authorizenetForm['cc_exp_month'], Locator::SELECTOR_XPATH)->getValue();
47  }
48 
54  public function getExpYear()
55  {
56  return $this->_rootElement->find($this->authorizenetForm['cc_exp_year'], Locator::SELECTOR_XPATH)->getValue();
57  }
58 
64  public function getCid()
65  {
66  return $this->_rootElement->find($this->authorizenetForm['cc_cid'], Locator::SELECTOR_XPATH)->getValue();
67  }
68 }