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

Add handling for billingCountry on update subscription

parent 6ccd9ac7
No related branches found
No related tags found
No related merge requests found
......@@ -434,6 +434,10 @@ trait CRM_Core_Payment_MJWTrait {
$propertyBag->setIsRecur(FALSE);
}
if (!$propertyBag->has('billingCountry') && $propertyBag->has('country')) {
$propertyBag->setBillingCountry($propertyBag->getCustomProperty('country'));
}
// Make sure we have a description for the contribution
if (!$propertyBag->has('description')) {
$propertyBag->setDescription(E::ts('Contribution: %1', [1 => $this->getPaymentProcessorLabel()]));
......@@ -532,9 +536,12 @@ trait CRM_Core_Payment_MJWTrait {
$propertyBag->setContributionRecurID($existingRecur['id']);
}
// @fixme Billing properties don't really work properly without https://github.com/civicrm/civicrm-core/pull/21527
// $propertyBag->setBillingCity($params['city'] ?? '');
// $propertyBag->setBillingCountry($params['country'] ?? '');
// @fixme Country: https://github.com/civicrm/civicrm-core/pull/28926 (5.71)
if (!$propertyBag->has('billingCountry') && $propertyBag->has('country')) {
$propertyBag->setBillingCountry($propertyBag->getCustomProperty('country'));
}
// $propertyBag->setBillingCountry($params['billingCountry'] ?? $params['country'] ?? '');
// $propertyBag->setBillingStateProvince()
$propertyBag->setCustomProperty('error_url', $this->getErrorUrl($propertyBag));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment