-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add payouts #8
Add payouts #8
Conversation
Great work Marcus 🔥 I highly recommend releasing this under a branch alias if possible, then we can test it out and fix any quirks before releasing a new stable version. |
@vinkla Yep, will do – and/or possible publish a pre-release. Still a few quirks to iron out, will ping when something is available to test. |
@vinkla You should now be able to require the development-branch with: "repositories": [
{
"type": "vcs",
"url": "git@github.com:olssonm/swish-php.git"
}
], And running |
Thanks! I'll test this as soon as possible. |
@@ -5,6 +5,8 @@ | |||
'client' => env('SWISH_CLIENT_CERTIFICATE_PATH'), | |||
'password' => env('SWISH_CLIENT_CERTIFICATE_PASSWORD'), | |||
'root' => env('SWISH_ROOT_CERTIFICATE_PATH', true), | |||
'signing' => env('SWISH_SIGNING_CERTIFICATE_PATH', null), // Optional, used for payouts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest wrapping these in a storage_path
helper function or providing an example of how to add these in the .env
file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vinkla Yes, should be clarified that it's the full/absolute path of the file that is needed. Using storage_path
is not optimal as the certificates might be stores outside of Laravel and/or the .env-file might be used by multiple apps in the same environment with different storage paths.
@@ -5,6 +5,8 @@ | |||
'client' => env('SWISH_CLIENT_CERTIFICATE_PATH'), | |||
'password' => env('SWISH_CLIENT_CERTIFICATE_PASSWORD'), | |||
'root' => env('SWISH_ROOT_CERTIFICATE_PATH', true), | |||
'signing' => env('SWISH_SIGNING_CERTIFICATE_PATH', null), // Optional, used for payouts | |||
'signing_password' => env('SWISH_SIGNING_CERTIFICATE_PASSWORD', null), // Optional, used for payouts | |||
], | |||
'endpoint' => \Olssonm\Swish\Client::PRODUCTION_ENDPOINT, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@olssonm what do you think about adding this as a environment variable as well?
'endpoint' => \Olssonm\Swish\Client::PRODUCTION_ENDPOINT, | |
'endpoint' => env('SWISH_URL', \Olssonm\Swish\Client::PRODUCTION_ENDPOINT), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vinkla Good call, definitely! Will add it in a separate PR soon, as Swish now also provides a staging environment that will be added as a constant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! The test API appears to be functioning as expected 🙌
This PR enables payouts via the Swish API (see #7).
Might require a major semver update depending on how the certificates and signing processes are handled.