Skip to content

Commit e281fbd

Browse files
committed
MAGETWO-60326: [Backport] - [GITHUB] Orders always get a status of Suspected Fraud in multi-currency store configurations #4263 - for 2.1
1 parent c0c2411 commit e281fbd

File tree

6 files changed

+188
-0
lines changed

6 files changed

+188
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?php
2+
/**
3+
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\Paypal\Test\Block\Form\PayflowAdvanced;
8+
9+
use Magento\Mtf\Client\Locator;
10+
use Magento\Payment\Test\Block\Form\Cc;
11+
12+
/**
13+
* Card Verification frame block.
14+
*/
15+
class CcAdvanced extends Cc
16+
{
17+
/**
18+
* 'Pay Now' button.
19+
*
20+
* @var string
21+
*/
22+
protected $continue = '#btn_pay_cc';
23+
24+
/**
25+
* Payflow Advanced iFrame locator.
26+
*
27+
* @var string
28+
*/
29+
protected $payflowAdvancedFrame = "#payflow-advanced-iframe";
30+
31+
/**
32+
* Initialize block. Switch to frame.
33+
*
34+
* @return void
35+
*/
36+
protected function init()
37+
{
38+
parent::init();
39+
$this->browser->switchToFrame(new Locator($this->payflowAdvancedFrame));
40+
}
41+
42+
/**
43+
* Press "Continue" button.
44+
*
45+
* @return void
46+
*/
47+
public function pressContinue()
48+
{
49+
$this->_rootElement->find($this->continue)->click();
50+
}
51+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" ?>
2+
<!--
3+
/**
4+
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<mapping strict="1">
9+
<fields>
10+
<cc_number>
11+
<selector>#cc_number</selector>
12+
</cc_number>
13+
<cc_exp_month>
14+
<selector>#expdate_month</selector>
15+
</cc_exp_month>
16+
<cc_exp_year>
17+
<selector>#expdate_year</selector>
18+
</cc_exp_year>
19+
<cc_cid>
20+
<selector>#cvv2_number</selector>
21+
</cc_cid>
22+
</fields>
23+
</mapping>
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?php
2+
/**
3+
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\Paypal\Test\Block\Form\PayflowAdvanced;
8+
9+
use Magento\Mtf\Client\Locator;
10+
use Magento\Payment\Test\Block\Form\Cc;
11+
12+
/**
13+
* Card Verification frame block.
14+
*/
15+
class CcLink extends Cc
16+
{
17+
/**
18+
* 'Pay Now' button.
19+
*
20+
* @var string
21+
*/
22+
protected $continue = '#btn_pay_cc';
23+
24+
/**
25+
* Payflow Link iFrame locator.
26+
*
27+
* @var string
28+
*/
29+
protected $payflowLinkFrame = "#payflow-link-iframe";
30+
31+
/**
32+
* Initialize block. Switch to frame.
33+
*
34+
* @return void
35+
*/
36+
protected function init()
37+
{
38+
parent::init();
39+
$this->browser->switchToFrame(new Locator($this->payflowLinkFrame));
40+
}
41+
42+
/**
43+
* Press "Continue" button.
44+
*
45+
* @return void
46+
*/
47+
public function pressContinue()
48+
{
49+
$this->_rootElement->find($this->continue)->click();
50+
}
51+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" ?>
2+
<!--
3+
/**
4+
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<mapping strict="1">
9+
<fields>
10+
<cc_number>
11+
<selector>#cc_number</selector>
12+
</cc_number>
13+
<cc_exp_month>
14+
<selector>#expdate_month</selector>
15+
</cc_exp_month>
16+
<cc_exp_year>
17+
<selector>#expdate_year</selector>
18+
</cc_exp_year>
19+
<cc_cid>
20+
<selector>#cvv2_number</selector>
21+
</cc_cid>
22+
</fields>
23+
</mapping>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
/**
4+
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/pages.xsd">
9+
<page name="CheckoutOnepage" mca="checkout/index">
10+
<block name="paymentBlock" class="Magento\Checkout\Test\Block\Onepage\Payment" locator="#checkout-step-payment" strategy="css selector" />
11+
<block name="payflowAdvancedCcBlock" class="Magento\Paypal\Test\Block\Form\PayflowAdvanced\CcAdvanced" locator="body" strategy="css selector"/>
12+
<block name="payflowLinkCcBlock" class="Magento\Paypal\Test\Block\Form\PayflowAdvanced\CcLink" locator="body" strategy="css selector"/>
13+
</page>
14+
</config>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" ?>
2+
<!--
3+
/**
4+
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/Magento/Mtf/Repository/etc/repository.xsd">
9+
<repository class="Magento\Payment\Test\Repository\CreditCard">
10+
<dataset name="visa_direct">
11+
<field name="cc_type" xsi:type="string">Visa</field>
12+
<field name="cc_number" xsi:type="string">4617747819866651</field>
13+
<field name="cc_exp_month" xsi:type="string">01 - January</field>
14+
<field name="cc_exp_year" xsi:type="string">2017</field>
15+
<field name="cc_cid" xsi:type="string">123</field>
16+
</dataset>
17+
18+
<dataset name="visa_payflow">
19+
<field name="cc_type" xsi:type="string">Visa</field>
20+
<field name="cc_number" xsi:type="string">4111111111111111</field>
21+
<field name="cc_exp_month" xsi:type="string">01 - January</field>
22+
<field name="cc_exp_year" xsi:type="string">2020</field>
23+
<field name="cc_cid" xsi:type="string">123</field>
24+
</dataset>
25+
</repository>
26+
</config>

0 commit comments

Comments
 (0)