The method prepareTransactionRequestPayload does no pass the anonymous user email

Created on 11 April 2024, 7 months ago
Updated 25 April 2024, 7 months ago

Problem/Motivation

The Nofraud service requires the email as part of the customer key.
Currently, the code uses $order->getCustomer()->getEmail() which means it fetches the customer email for authenticated users only. There won't be a value for anonymous users which is an issue.
This way, Nofraud will probably consider the transaction as a fraudulent one.

Steps to reproduce

1. Place an order as an anonymous user.
2. Open the Nofraud portal: https://portal.nofraud.com/transaction/{transaction_id}
3. Check the "Email" value under the "Billing" section.
4. No value will be available or "N/A"

Proposed resolution

Use $order->getEmail() instead of $order->getCustomer()->getEmail(). This way, there will always be an email.

Remaining tasks

Write a proper fix and push a new release.

User interface changes

No.

API changes

No.

Data model changes

No.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇲🇩Moldova andrei.vesterli Chisinau

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024