1

Trying to test the checkout on my Magento 2.0.7 site. When I enter credit card information and hit the "place order" button, the ajax loader appears and remains there without any discernible response.

Opening the debug.log I can see the following arrays logged by the transaction, but I can't make heads or tails on what the problem is:

main.DEBUG: array ( 'request' => array ( 'user' => '****', 'vendor' => 'Bukuysk', 'partner' => 'PayPal', 'pwd' => '****', 'verbosity' => 'HIGH', 'BNCODE' => 'Magento_Cart_Community', 'tender' => 'C', 'trxtype' => 'A', 'amt' => 0, 'createsecuretoken' => 'Y', 'securetokenid' => '0b50e95b762a30710ab71db50cf751f8', 'returnurl' => 'http://tm34commerce.com/paypal/transparent/response/', 'errorurl' => 'http://tm34commerce.com/paypal/transparent/response/', 'cancelurl' => 'http://tm34commerce.com/paypal/transparent/cancel/', 'disablereceipt' => 'TRUE', 'silenttran' => 'TRUE', 'firstname' => 'Ryan', 'lastname' => 'Miller', 'street' => '3587 South Federal Hwy Apt B', 'city' => 'Boynton Beach', 'state' => 'FL', 'zip' => '33435', 'country' => 'US', 'email' => 'ryanmiller732@gmail.com', 'shiptofirstname' => 'Ryan', 'shiptolastname' => 'Miller', 'shiptostreet' => '3587 South Federal Hwy Apt B', 'shiptocity' => 'Boynton Beach', 'shiptostate' => 'FL', 'shiptozip' => '33435', 'shiptocountry' => 'US', ), 'result' => array ( 'result' => '0', 'respmsg' => 'Approved', 'securetoken' => '985uWjaVg9UWaTmOzC0UIjQrH', 'securetokenid' => '0b50e95b762a30710ab71db50cf751f8', 'result_code' => '0', ), ) {"is_exception":false} []

I've placed a test order using the check/money order option, so the checkout itself works. It's paypal that's the problem. Is there anything in the debug log that indicates what the problem would be and how to fix this?

3
  • Try it again, but open your browser dev tools to the 'network' tab to see the requests going out. See the response code and data for the last one to go out. Most likely, your settings aren't quite right on the PayFlow Pro side, or it may be complaining about lack of SSL or such. – Ryan Hoerr Oct 4 '16 at 1:12
  • check your web server(ngnix, apache, etc) for hits/errors on the paypal's return url, it should be something like paypal/payflow/return to make sure that it is being hit and to check for errors when it does – Goku Oct 4 '16 at 6:46
  • couldn't find anything in the server logs that would indicate the problem. I'm installing SSL and hopping on the phone with Paypal support today so we'll see what happens. – r miller Oct 4 '16 at 15:45
4

There were a few problems, all of which are now fixed:

  • SSL was not installed
  • Payment Action needed to be set to Authorization
  • All return URLs in PayPal Manager need to be set to POST

Now all's working fine.

0

I have faced the same error and fixed it by made few changes in following core file of vendor folder.

vendor/magento/module-paypal/Model/Payflow/Service/Request/SecureToken.php

  • Added

use Magento\Payment\Helper\Formatter;

  • After

use Magento\Quote\Model\Quote;

  • Then Added

use Formatter;

  • After

/**

  • @var UrlInterface */ private $url;
  • Last changed is in function requestToken

Orignal Line

$request->setAmt(0);

New Line

request->setAmt($this->formatPrice($quote->getGrandTotal()));

Final file will be following:

<?php

/**

  • Copyright © Magento, Inc. All rights reserved.
  • See COPYING.txt for license details. */ namespace Magento\Paypal\Model\Payflow\Service\Request;

use Magento\Framework\Math\Random; use Magento\Framework\DataObject; use Magento\Framework\UrlInterface; use Magento\Paypal\Model\Payflow\Transparent; use Magento\Paypal\Model\Payflowpro; use Magento\Quote\Model\Quote; use Magento\Payment\Helper\Formatter; /**

  • Class SecureToken / class SecureToken { /*

    • @var UrlInterface */ private $url;

    use Formatter;

    /**

    • @var Random */ private $mathRandom;

    /**

    • @var Transparent */ private $transparent;

    /**

    • @param UrlInterface $url

    • @param Random $mathRandom

    • @param Transparent $transparent */ public function __construct( UrlInterface $url, Random $mathRandom, Transparent $transparent ) {

      $this->url = $url; $this->mathRandom = $mathRandom; $this->transparent = $transparent; }

    /**

    • Get the Secure Token from Paypal for TR

    • @param Quote $quote

    • @return DataObject

    • @throws \Exception */ public function requestToken(Quote $quote) { $this->transparent->setStore($quote->getStoreId()); $request = $this->transparent->buildBasicRequest(); $request->setTrxtype(Payflowpro::TRXTYPE_AUTH_ONLY); $request->setVerbosity('HIGH'); $request->setAmt($this->formatPrice($quote->getGrandTotal()));
      $request->setCurrency($quote->getBaseCurrencyCode()); $request->setCreatesecuretoken('Y'); $request->setSecuretokenid($this->mathRandom->getUniqueHash()); $request->setReturnurl($this->url->getUrl('paypal/transparent/response')); $request->setErrorurl($this->url->getUrl('paypal/transparent/response')); $request->setCancelurl($this->url->getUrl('paypal/transparent/cancel')); $request->setDisablereceipt('TRUE'); $request->setSilenttran('TRUE');

      $this->transparent->fillCustomerContacts($quote, $request);

      $result = $this->transparent->postRequest($request, $this->transparent->getConfig());

      return $result; } }

0

For me it was the store switcher adding information to the returned URL for PAYFLOW.

I added paypal/* to the store switcher pages to exclude section and the problem was solved, Not saying this is what your problem is, but if others have a never completing Payflow CC checkout page then this might be the solution.

Here is the URL the store switcher was adding information to.

paypal/transparent/redirect/

Hope this helps someone, took me a while to nail it down, no errors, not log entries, have a great day everyone.

New contributor
Qkits Electronics is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.