• Came across a previous support thread here (https://wordpress.org/support/topic/the-billingcountry-value-is-missing-in-sagepay/) which has gone unanswered, and I had exactly the same issue earlier today.

    I can’t reply to that topic, so for anyone that comes across the same issue – if you’re getting a 5080 Form transaction registration failed, and SagePay is telling you that the BillingCountry field is invalid, make sure that your form’s Country field is sending the full country name instead of the ISO code (i.e. United Kingdom instead of GB) as this plugin converts the country name *to* the ISO code to send to SagePay, and in my opinion doesn’t handle it at all correctly if it’s already receiving an ISO code.

    So anyway, on to the main point of this topic – is this plugin still being developed? Because this is a big enough issue IMO that it should be fixed, but if the original developers aren’t still maintaining it, I don’t know whether to fork the plugin and put a fix up, or ask them if they want me to submit a patch.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @gazchap. If you happen to have the fix and still want to share that would be brilliant. I’m having the same issue

    Thread Starter gazchap

    (@gazchap)

    The fix I applied in the end was simply to have my form send the country as the name instead of the ISO code so that the plugin worked correctly – in my case, it was literally just a case of changing the default value for the country field if I remember, as it wasn’t something the user could change anyway.

    I haven’t tested this, but in theory an actual fix would be as simple as doing the following:

    In class-gf-sagepay-form.php on line 1,051, change:

    if ( $field['name'] == 'country' ) {

    to

    if ( $field['name'] == 'country' && strlen( $value ) != 2 ) {

    Which would tell the plugin to convert the submitted form value to a country code, unless the submitted form value is 2 characters long, in which case it would leave it alone on the assumption that it’s already a country code.

    I don’t think there’s any countries with names that are just 2 characters long, so it should be safe enough.

    Like I say though, untested so your mileage may vary.

    Thanks @gazchap. That’s really helpful.

    Plugin Author PatSaTECH

    (@patsatech)

    Hi @gazchap @nickstaw ,

    Sorry for not replying. Can you guys please let me know is this happening with donations products? And also what version of the plugin you are using.

    Plugin Author PatSaTECH

    (@patsatech)

    Hi,

    Also have posted the update to use 2 character country code. Try it and if you face any issues let us know. We have also hosted a test form at https://www.patsatech.com/sandbox/gravityforms/redirect-payment-form/ if you would like to try the version out.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Is this plugin still being developed?’ is closed to new replies.