Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #228766 fix: ccAvenue: Billing Details >> Name and phone value does not get autofilled #82

Open
wants to merge 1 commit into
base: j4x
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions code/plugins/ccavenue/ccavenue.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,13 @@ public function onTP_GetHTML($vars)

// Notify URL set for notify url parameter of payment gateway
$gatewaydata['notify_url'] = $vars->notify_url;
$gatewaydata['billing_name'] = $vars->userInfo['firstname'] . ' ' . $vars->userInfo['lastname'];
$gatewaydata['billing_name'] = $vars->user_firstname . ' ' . $vars->user_lastname;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vaibhavsTekdi $vars is the value we get from the extension we can add $vars->user_firstname and $vars->user_firstname from the extension itself.

If we change or remove $vars->userInfo['firstname'] it might break the backward compatibility and might stop working for other extensions

$gatewaydata['billing_address'] = $vars->userInfo['add_line1'];
$gatewaydata['billing_city'] = $vars->userInfo['city'];
$gatewaydata['billing_state'] = $vars->userInfo['state_code'];
$gatewaydata['billing_zip'] = $vars->userInfo['zipcode'];
$gatewaydata['billing_country'] = $vars->userInfo['country_code'];
$gatewaydata['billing_tel'] = $vars->phone;
$gatewaydata['billing_tel'] = $vars->userInfo['phone'];
$gatewaydata['billing_email'] = $vars->user_email;
$gatewaydata['currency'] = $vars->currency_code;

Expand Down