Remove getting shipping address as fallback for card holder name

This commit is contained in:
dinamiko 2021-11-30 12:34:19 +01:00
parent cf3ba3f55c
commit 26147791ab

View file

@ -199,12 +199,8 @@ class CreditCardRenderer {
hostedFieldsData.cardholderName = this.defaultConfig.payer.given_name + ' ' + this.defaultConfig.payer.surname; hostedFieldsData.cardholderName = this.defaultConfig.payer.given_name + ' ' + this.defaultConfig.payer.surname;
} }
if (!hostedFieldsData.cardholderName) { if (!hostedFieldsData.cardholderName) {
const firstName = document.getElementById('billing_first_name') ? document.getElementById('billing_first_name').value const firstName = document.getElementById('billing_first_name') ? document.getElementById('billing_first_name').value : '';
: document.getElementById('shipping_first_name') ? document.getElementById('shipping_first_name').value const lastName = document.getElementById('billing_last_name') ? document.getElementById('billing_last_name').value : '';
: '';
const lastName = document.getElementById('billing_last_name') ? document.getElementById('billing_last_name').value
: document.getElementById('shipping_last_name') ? document.getElementById('shipping_last_name').value
: '';
if (!firstName || !lastName) { if (!firstName || !lastName) {
this.spinner.unblock(); this.spinner.unblock();