chitezh / woocommerce_states_places

Woocommerce plugin that lists states, cities, local government areas and towns
https://wordpress.org/plugins/states-cities-and-places-for-woocommerce
GNU General Public License v3.0
50 stars 141 forks source link

woocommerce_states_places do not send the "state" parameter in billing data #120

Open AhmedElsayedEtogary opened 4 years ago

AhmedElsayedEtogary commented 4 years ago

Hi Team,

I installed your plugin on my website etogary.com and everything is doing well.

I contracted with a payment gateway company in order to collect payments via Visa/Mastercard, etc.....

Then when they tested the payment gateway it gave this this error:

After testing your website we found out that some of the data you are sending is not correct :

kindly be noted that you do not send the "state" parameter in billing data so if you do not need to send the state value, send it as "NA"

Error

billing_data': {'email': 'youssef@moakt.cc', 'city': 'المطرية', 'country': 'EG', 'postal_code': 'NA', 'phone_number': '01000000000', 'last_name': 'Account', 'state': 'CAI', 'street': '20 omar kamel,arfat -', 'building': 'NA', 'floor': 'NA', 'extra_description': 'NA', 'apartment': 'NA', 'first_name': 'Test'},

Correct Billing Data

"billing_data": { "apartment": "NA", "email": customer mail", "floor": "NA", "first_name": "customer firstname", "street": "NA", "building": "NA", "phone_number": "customer phone number", "shipping_method": "PKG", "postal_code": "NA", "city": "NA", "country": "NA", "last_name": "customer lastname", "state": "NA" }

Please be noted that your integration will work fine after fixing the above.

So, would you help me fixing this error?

I look forward to hearing from you.

Thanks Ahmed