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

Store _pronamic_payment_config_id in JSON #231

Closed
Tracked by #218
remcotolsma opened this issue Oct 4, 2021 · 2 comments
Closed
Tracked by #218

Store _pronamic_payment_config_id in JSON #231

remcotolsma opened this issue Oct 4, 2021 · 2 comments
Assignees

Comments

@remcotolsma
Copy link
Member

remcotolsma commented Oct 4, 2021

In #196 i suggested to store more gateway configuration within each payment / subscription. Maybe we can already take this into account within this issue?

payment {
    "config_id": "50"
}
payment {
    "gateway_configuration": {
        "$ref": "http://pay.local/wp-json/pronamic-pay/v1/gateways/configurations/50",
        "post_id": "50"  
    }
}

@rvdsteege ?

@remcotolsma
Copy link
Member Author

In many places we use config_id like this: $gateway = Plugin::get_gateway( $payment->get_config_id() );. We could also consider to change it to $gateway = $payment->get_gateway():

payment {
    "gateway": {
        "$ref": "http://pay.local/wp-json/pronamic-pay/v1/gateways/50",
        "post_id": "50"  
    }
}

@remcotolsma
Copy link
Member Author

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

No branches or pull requests

2 participants