Skip to content

Field restriction incompatibilities between klarna_core_order and sales_order_payment last_trans_id #18615

@iancassidyweb

Description

@iancassidyweb

Overview

  • Klarna Orders have an identifier which is 36 characters long
  • The sales_order_payment table has a column last_trans_id which stores the id of the transaction.
  • This column has a limit of 32 characters. See Schema
  • As Magento supports multiple 3rd party payment gateways, a field length of 32 characters is inconsistent with that of third party payment gateways.
  • See examples below.
    • Table: amazon_sales_order -> Row: amazon_order_reference_id (varchar 255)
    • Tabe: klarna_core_order -> Row: klarna_order_id (varchar 255)
  • At this point in time, this only affects Klarna orders as they have a length of 36 characters however this could also potentially impact Amazon orders in the future, if the length of the order reference increases beyond 32 characters.

Preconditions (*)

  • Clean installation of Magento 2.2.5 or Magento 2.2.6
  • Configure Klarna in Sandbox Mode

Steps to reproduce (*)

  1. Place an order in the Klarna Sandbox
  2. Load the sales_order_payment table and observe the value inside last_trans_id column
  3. Compare this value with the value in the klarna_core_order table
  4. You will see the value inside last_trans_id is 4 characters shorter than that in the klarna_core_order table which is down to the table schema.

Expected result (*)

  1. When placing an order with Klarna the full order reference should be stored in the:
  • Rowsales_ last_trans_id column.

Actual result (*)

  1. The value recorded in the last_trans_id column is 4 characters short.

In order to resolve the issue the structure for 'sales_order_payment' 'last_trans_id' should be updated to varchar 255 so that it is in-line with 3rd party payment gateways.

Screenshots

amazon_sales_order
klarna_core_order
sales_order_payment

Metadata

Metadata

Assignees

Labels

Component: SalesFixed 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: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: Format is validGate 1 Passed. Automatic verification of issue format passedIssue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions