Skip to content

Commit 09b3735

Browse files
committed
MC-17405: Add resolver for Pay Flow Pro support
- added fixes for review comments
1 parent 10fb079 commit 09b3735

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed

app/code/Magento/Paypal/Controller/Transparent/Response.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
use Magento\Framework\Session\Generic as Session;
2222

2323
/**
24+
* Class for requesting the response result form the paypal controller.
2425
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2526
*/
2627
class Response extends \Magento\Framework\App\Action\Action implements CsrfAwareActionInterface
@@ -112,6 +113,8 @@ public function validateForCsrf(RequestInterface $request): ?bool
112113
}
113114

114115
/**
116+
* Exceute svaes the payment in quote and sends the resultInterface
117+
*
115118
* @return ResultInterface
116119
*/
117120
public function execute()

app/code/Magento/Paypal/Model/Payflow/Service/Request/SecureToken.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use Magento\Quote\Model\Quote;
1717

1818
/**
19-
* Class SecureToken for setting, posting and returning a response DataObject for RequestSecureToken controller.
19+
* Class for requesting a secure Payflow Pro token from Paypal
2020
*/
2121
class SecureToken
2222
{
@@ -59,7 +59,7 @@ public function __construct(
5959
* @return DataObject
6060
* @throws \Exception
6161
*/
62-
public function requestToken(Quote $quote, $urls = [])
62+
public function requestToken(Quote $quote, array $urls = [])
6363
{
6464
$this->transparent->setStore($quote->getStoreId());
6565
$request = $this->transparent->buildBasicRequest();

app/code/Magento/PaypalGraphQl/Model/Resolver/PayflowProToken.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function resolve(
6262
array $args = null
6363
) {
6464
$cartId = $args['input']['cart_id'] ?? '';
65-
$urls = $args['input']['urls'] ?? '';
65+
$urls = $args['input']['urls'] ?? null ;
6666

6767
$customerId = $context->getUserId();
6868
$cart = $this->getCartForUser->execute($cartId, $customerId);

dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Customer/PlaceOrderWithPayflowProTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use Magento\Framework\Webapi\Request;
1818

1919
/**
20-
* Test ExpressSetPaymentMethodTest graphql endpoint for customer
20+
* End to end place order test using payflowpro via graphql endpoint for customer
2121
*
2222
* @magentoAppArea graphql
2323
*/

dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PaypalPayflowProSetPaymentMethodTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
namespace Magento\PaypalGraphQl\Model\Resolver\Guest;
99

1010
use Magento\Framework\App\Request\Http;
11-
use Magento\Paypal\Model\Api\Nvp;
1211
use Magento\PaypalGraphQl\PaypalPayflowProAbstractTest;
1312
use Magento\Framework\Serialize\SerializerInterface;
1413
use Magento\Quote\Model\QuoteIdToMaskedQuoteId;

0 commit comments

Comments
 (0)