fixed bug - US payments had extra field stateOrProvince

This commit is contained in:
anamotaadyen
2022-10-31 13:55:00 +00:00
parent 0b4bbb486e
commit 58137eed1d
2 changed files with 1 additions and 10 deletions

View File

@@ -140,6 +140,7 @@ def sanatizeRequest(payments_request):
del payments_request['houseNumberOrName']
del payments_request['postalCode']
del payments_request['street']
del payments_request['stateOrProvince']

View File

@@ -1,13 +1,7 @@
const clientKey = JSON.parse(document.getElementById("client-key").innerHTML)
const storedCountry = document.getElementById("country-code")
const currentPM = document.getElementById("pay-methods")
// Used to retrieve country value from url
const urlCountryParams = new URLSearchParams(window.location.search)
const countryURL = urlCountryParams.get("country")
console.log(countryURL)
/**
* Global configuration variables
* @param {HTMLHtmlElement} r - Identifies root of document for css variables
@@ -299,10 +293,6 @@ if (storedCountry) {
const selectedCountry = JSON.parse(storedCountry.innerHTML)
countrySettings = getCountryData(selectedCountry)
}
if (countryURL) {
const selectedCountry = countryURL
countrySettings = getCountryData(selectedCountry)
}
function getCountryData(countrySettings) {
return countryVariables.find(