diff --git a/README.md b/README.md index 47d6cb6..2e3f346 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,7 @@ The action accepts the following parameters: | `user_street` | String | The street address of the contact | | | | `user_postal_code` | String | The postal code of the contact | | | | `user_city` | String | The city of the contact | | | +| `user_country` | String | The country of the contact | [ISO 3166-1 Alpha-2 country codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) | | | `user_telephone` | String | The telephone number of the contact | | | | `user_company` | String | The company of the contact | | | | `user_extrafield` | String | Additional information of the contact | | | diff --git a/api/v3/TwingleDonation/Submit.php b/api/v3/TwingleDonation/Submit.php index 2a369b9..cc1d075 100644 --- a/api/v3/TwingleDonation/Submit.php +++ b/api/v3/TwingleDonation/Submit.php @@ -203,6 +203,13 @@ function _civicrm_api3_twingle_donation_Submit_spec(&$params) { 'api.required' => 0, 'description' => E::ts('The city of the contact.'), ); + $params['user_country'] = array( + 'name' => 'user_country', + 'title' => E::ts('Country'), + 'type' => CRM_Utils_Type::T_STRING, + 'api.required' => 0, + 'description' => E::ts('The country of the contact.'), + ); $params['user_telephone'] = array( 'name' => 'user_telephone', 'title' => E::ts('Telephone'), @@ -287,6 +294,7 @@ function civicrm_api3_twingle_donation_Submit($params) { 'user_street' => 'street_address', 'user_postal_code' => 'postal_code', 'user_city' => 'city', + 'user_country' => 'country', ) as $address_param => $address_component) { if (!empty($params[$address_param])) { $params[$address_component] = $params[$address_param];