1

I am trying to write link to Payment Transaction to Oder's comment.

But it seems UrlBuilder generates incorrect security key for the link.

Link from transaction page:

backend/sales/transactions/view/txn_id/4/key/107dd581bc9af9c35f8069181a5ebe7195c9cc3d96936201fb9a4a53b4960dd9/

Link from comment:

backend/sales/transactions/view/txn_id/4/key/3711f2bda03d84cfc34662e93697d94ac73b27061e2c1144cd7edd32e88adddc/

public function __construct(
    \Magento\Backend\Model\UrlInterface $urlBuilder,
 ...
) {
    $this->urlBuilder        = $urlBuilder;
...
}


$this->urlBuilder->getUrl(
    'sales/transactions/view',
    [
        'txn_id' => $txnId
    ]
);

Where am I wrong?

  • Try with $this->urlBuilder->getUrl( '*/*/*', [ 'txn_id' => $txnId ] ); – kunj May 11 '18 at 10:37
  • @kunj `*/*/*` is not ok. I'm doing it from custom controller. – Ruslan Mavlyanov May 11 '18 at 16:11

Your Answer

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

Browse other questions tagged or ask your own question.