Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API : Set current domain as a sensible default for payment processor #12595

Merged
merged 1 commit into from
Aug 2, 2018

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Change api PaymentProcessor.create action such that domain_id is optional. When id is not present use the current domain as a default.

Before

    $processor = $this->callAPISuccess('PaymentProcessor', 'create', [
      'payment_processor_type_id' => 'omnipay_PayPal_Express',
    ]);

Fails as domain_id is mandatory

After

Above passes & current domain id is used.

Technical Details

This is consistent with other api - e.g Navigation.

Comments

@civibot
Copy link

civibot bot commented Jul 30, 2018

(Standard links)

@@ -56,7 +56,6 @@ function _civicrm_api3_payment_processor_type_create_spec(&$params) {
$params['class_name']['api.required'] = 1;
$params['is_active']['api.default'] = 1;
$params['is_recur']['api.default'] = FALSE;
// FIXME bool support // $params['is_recur']['api.required'] = 1;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line seemed meaningless to me so removed it at the same time

@eileenmcnaughton
Copy link
Contributor Author

@seamuslee001

@eileenmcnaughton
Copy link
Contributor Author

@colemanw can you merge this?

@colemanw colemanw merged commit 34cbc76 into civicrm:master Aug 2, 2018
@eileenmcnaughton eileenmcnaughton deleted the payment_processor_domain branch August 2, 2018 09:26
@eileenmcnaughton
Copy link
Contributor Author

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants