Skip to content

Argument 1 passed to Magento\Sales\Model\Order\Payment must be an instance of Magento\Framework\DataObject, none given #16184

Closed
@Jakhotiya

Description

@Jakhotiya

$order->getPayment()->setTransactionId(null)->setParentTransactionId($response->getXTransId())->void();

Preconditions

Magento2 2.2 dev branch

Steps to reproduce

  1. Setup authorizenet
  2. Setup a plugin that uses declineOrder method of the Directpost model
  3. Checkout with authorizenet

Expected result

Order is declined

Actual result

Uncaught TypeError: Argument 1 passed to Magento\Sales\Model\Order\Payment\Interceptor::void() must be an instance of Magento\Framework\DataObject, none given.

Some points to note are

  1. void method is not part of the interface \Magento\Sales\Api\Data\OrderPaymentInterface
  2. void method is not called with any arguments in declineOrder method of Directpost Model

Metadata

Metadata

Assignees

Labels

Fixed in 2.1.xThe issue has been fixed in 2.1 release lineFixed in 2.2.xThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineIssue: Clear DescriptionGate 2 Passed. Manual verification of the issue description passedIssue: Format is validGate 1 Passed. Automatic verification of issue format passed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions