Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

Unintended truncation of State Code on eWay screen and receipt

  • austega
  • austega
  • OFFLINE
  • Posts: 94
  • Thanks: 0
  • Karma: 1
11 years 1 month ago #234520 by austega
Yes, inserting AU-NSW in the state field on a new registration works fine as far as eWay showing NSW in its screen and receipt.

That of course leaves me still with the large problem of users just entering NSW as is practice here. Are you assuming some post input process that adds AU- to the state field when a user enters NSW (and Australia in the country field)? And what is the advantage of this prefix - why not simply use the state code as given?

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
11 years 1 month ago #234535 by krileon
The prefix is supposed to be there. CBSubs adds it if you update the invoice address through CBSubs instead of just letting it sync from a CB field. I think this is a bug of the field sync feature though as it should properly format it, but it doesn't appear to be doing so. Have created a bug ticket for further investigation. In the mean time you can try applying the below to see if it'll work with either/or usages for now.

IN: /components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/processors/eway/cbpaidsubscriptions.eway.php
ON: Line 504
FROM:
Code:
$addressFields['CustomerState'] = array( substr( $paymentBasket->address_state, -2 ), 2 );
TO:
Code:
$countryStatePosition = strpos( $paymentBasket->address_state, '-' ); $addressFields['CustomerState'] = array( ( $countryStatePosition ? substr( $paymentBasket->address_state, ( $countryStatePosition + 1 ) ) : $paymentBasket->address_state ), 3 );


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • austega
  • austega
  • OFFLINE
  • Posts: 94
  • Thanks: 0
  • Karma: 1
11 years 1 month ago #234566 by austega
Thanks Kyle. The patch worked well on a new registration test.

In terms of the possible bug, in case it is relevant we currently have Paid Subs | Settings | Display | Invoices | Customer invoicing address set to No Invoicing Address Shown, though earlier in our testing we did have this set to one of the Yes options.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48466
  • Thanks: 8280
  • Karma: 1443
11 years 1 month ago #234584 by krileon
It's due to the CB field to CBSubs invoice field synchronization. It's not properly formatting the values it's getting from your CB fields. It should be formatting and validating them correctly so this doesn't happen. I've created a bug ticket to investigate further for next release. For now just continue to use the workaround.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: austega

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum