Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Stripe Stripe
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 59
    • Issues 59
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 7
    • Merge requests 7
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Extensions
  • StripeStripe
  • Issues
  • #329

Closed
Open
Created Jul 28, 2021 by andyburns@andyburns

Postcode or ZIP field condition

Depending on the card number I input, it then shows a Postcode or ZIP field to fill in in the Stripe element.

Testing on https://www.mjwconsult.co.uk/en/civicrm/contribute/transact/?id=1&pcpId=4&reset=1

Using the Stripe test card, it shows postcode, which works well for international addresses by providing a postcode field that accepts more than 5 digits. It appears to accept a very long string to comply with any post code format worldwide.

image

I tried one of my card's and it shows ZIP field. I am in the US.

1

Here is a message we received from a Switzerland contact:

No matter what I enter for my postal code, it tells me that it is incomplete and I cannot submit the form. I have tried 6300, 6300 Zug, blank, and 63000 and 15236 (in case it thinks I need a five-digit code or a valid US zip code) but I always get the error "Your postal code is incomplete".

@mattwire how does this logic work?

Edited Jul 28, 2021 by andyburns
Assignee
Assign to
Time tracking