Skip to content
Snippets Groups Projects
Commit 521b1cca authored by mattwire's avatar mattwire
Browse files

Support cards that do not request a postal/zip code

parent 007432ac
Branches
Tags
No related merge requests found
......@@ -302,9 +302,12 @@ class CRM_Core_Payment_Stripe extends CRM_Core_Payment {
$billingLocationID = CRM_Core_BAO_LocationType::getBilling();
}
// Stripe does not require the state/county field
if (!empty($metadata["billing_state_province_id-{$billingLocationID}"]['is_required'])) {
$metadata["billing_state_province_id-{$billingLocationID}"]['is_required'] = FALSE;
// Stripe does not require some of the billing fields but users may still choose to fill them in.
$nonRequiredBillingFields = ["billing_state_province_id-{$billingLocationID}", "billing_postal_code-{$billingLocationID}"];
foreach ($nonRequiredBillingFields as $fieldName) {
if (!empty($metadata[$fieldName]['is_required'])) {
$metadata[$fieldName]['is_required'] = FALSE;
}
}
return $metadata;
......
## Release 6.0.1
* Support cards that do not request a postal/zip code.
## Release 6.0
*Switch to Stripe Elements for SAQ-A compliance on most sites and support the European Secure Customer Authentication (SCA) payments directive.*
......
......@@ -12,8 +12,8 @@
<author>Matthew Wire (MJW Consulting)</author>
<email>mjw@mjwconsult.co.uk</email>
</maintainer>
<releaseDate>2019-09-13</releaseDate>
<version>6.0</version>
<releaseDate>2019-09-14</releaseDate>
<version>6.0.1</version>
<develStage>stable</develStage>
<compatibility>
<ver>5.13</ver>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment