[#6] Make contribution status configurable per payment method
This commit is contained in:
parent
17589ef616
commit
7ff6381ad8
4 changed files with 64 additions and 3 deletions
|
@ -201,7 +201,12 @@ class CRM_Twingle_Profile {
|
|||
'membership_type_id',
|
||||
),
|
||||
// Add payment methods.
|
||||
array_keys(static::paymentInstruments())
|
||||
array_keys(static::paymentInstruments()),
|
||||
|
||||
// Add contribution status for all payment methods.
|
||||
array_map(function ($attribute) {
|
||||
return $attribute . '_status';
|
||||
}, array_keys(static::paymentInstruments()))
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -263,7 +268,11 @@ class CRM_Twingle_Profile {
|
|||
'contribution_source' => NULL,
|
||||
'custom_field_mapping' => NULL,
|
||||
'membership_type_id' => NULL,
|
||||
));
|
||||
)
|
||||
// Add contribution status for all payment methods.
|
||||
+ array_fill_keys(array_map(function($attribute) {
|
||||
return $attribute . '_status';
|
||||
}, array_keys(static::paymentInstruments())), CRM_Twingle_Submission::CONTRIBUTION_STATUS_COMPLETED));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue