Skip to content

Commit 296e9d1

Browse files
author
Anna Bukatar
committed
ACP2E-2841: Payflow creates new transaction each time we click on fetch button on the view transaction screen
1 parent 9e667db commit 296e9d1

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

app/code/Magento/Paypal/Test/Unit/Model/Payflow/TransparentTest.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,15 +125,21 @@ public function testCaptureCorrectId(string $parentTransactionId)
125125
$gatewayToken = 'gateway_token';
126126
$this->payment->expects($this->once())->method('getParentTransactionId')->willReturn($parentTransactionId);
127127
$this->payment->expects($this->exactly($setParentTransactionIdCalls))->method('setParentTransactionId');
128-
$this->payment->expects($this->exactly($setAdditionalInformationCalls))->method('setAdditionalInformation')->with(Payflowpro::PNREF, $gatewayToken);
128+
$this->payment->expects($this->exactly($setAdditionalInformationCalls))
129+
->method('setAdditionalInformation')
130+
->with(Payflowpro::PNREF, $gatewayToken);
129131
$this->payment->expects($this->exactly(4))->method('getAdditionalInformation')->withConsecutive(
130132
['result_code'],
131133
[Payflowpro::PNREF],
132134
[Payflowpro::PNREF],
133135
[Payflowpro::PNREF],
134136
)->willReturn(0, '', Payflowpro::PNREF, Payflowpro::PNREF);
135-
$this->paymentExtensionAttributes->expects($this->once())->method('getVaultPaymentToken')->willReturn($this->paymentToken);
136-
$this->paymentToken->expects($this->exactly($getGatewayTokenCalls))->method('getGatewayToken')->willReturn($gatewayToken);
137+
$this->paymentExtensionAttributes->expects($this->once())
138+
->method('getVaultPaymentToken')
139+
->willReturn($this->paymentToken);
140+
$this->paymentToken->expects($this->exactly($getGatewayTokenCalls))
141+
->method('getGatewayToken')
142+
->willReturn($gatewayToken);
137143

138144
$this->subject->capture($this->payment, 100);
139145
}

0 commit comments

Comments
 (0)