Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
Braintree Class Reference
Inheritance diagram for Braintree:

Public Member Functions

 getFields ()
 
 specifyCredentials ()
 
 clearCredentials ()
 
 getEnablerFields ()
 
 clickConfigureButton ()
 
 enableBraintree ()
 
 disableBraintree ()
 

Detailed Description

Configuration for Braintree payment method.

Definition at line 15 of file Braintree.php.

Member Function Documentation

◆ clearCredentials()

clearCredentials ( )

Clear credentials in Braintree configuration.

Returns
void

Definition at line 73 of file Braintree.php.

74  {
75  $this->_rootElement->find($this->fields['Merchant ID'])->setValue('');
76  $this->_rootElement->find($this->fields['Public Key'])->setValue('');
77  $this->_rootElement->find($this->fields['Private Key'])->setValue('');
78  }

◆ clickConfigureButton()

clickConfigureButton ( )

Click 'Configure' button to expand Braintree configuration.

Returns
void

Definition at line 95 of file Braintree.php.

96  {
97  $this->_rootElement->find($this->configureBraintreeButton)->click();
98  }

◆ disableBraintree()

disableBraintree ( )

Set 'Enable this Solution' = No.

Returns
void

Definition at line 119 of file Braintree.php.

120  {
121  $this->_rootElement->find(
122  $this->enablers['Enable this Solution'],
123  Locator::SELECTOR_CSS,
124  'select'
125  )->setValue('No');
126  }

◆ enableBraintree()

enableBraintree ( )

Set 'Enable this Solution' = Yes.

Returns
void

Definition at line 105 of file Braintree.php.

106  {
107  $this->_rootElement->find(
108  $this->enablers['Enable this Solution'],
109  Locator::SELECTOR_CSS,
110  'select'
111  )->setValue('Yes');
112  }

◆ getEnablerFields()

getEnablerFields ( )

Return enabler fields selectors.

Returns
array

Definition at line 85 of file Braintree.php.

86  {
87  return $this->enablers;
88  }

◆ getFields()

getFields ( )

Return credentials fields selectors.

Returns
array

Definition at line 51 of file Braintree.php.

52  {
53  return $this->fields;
54  }

◆ specifyCredentials()

specifyCredentials ( )

Specify credentials in Braintree configuration.

Returns
void

Definition at line 61 of file Braintree.php.

62  {
63  $this->_rootElement->find($this->fields['Merchant ID'])->setValue('1');
64  $this->_rootElement->find($this->fields['Public Key'])->setValue('1');
65  $this->_rootElement->find($this->fields['Private Key'])->setValue('1');
66  }

The documentation for this class was generated from the following file: