mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
adjustment for string methods
This commit is contained in:
parent
7dbe870ce0
commit
39db18f532
@ -37,9 +37,13 @@ trait SubscriptionHooker
|
|||||||
|
|
||||||
nlog("method name must be a string");
|
nlog("method name must be a string");
|
||||||
nlog($subscription->webhook_configuration['post_purchase_rest_method']);
|
nlog($subscription->webhook_configuration['post_purchase_rest_method']);
|
||||||
|
nlog($subscription->webhook_configuration['post_purchase_url']);
|
||||||
|
|
||||||
|
$post_purchase_rest_method = (string)$subscription->webhook_configuration['post_purchase_rest_method'];
|
||||||
|
$post_purchase_url = (string)$subscription->webhook_configuration['post_purchase_url'];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$response = $client->{$subscription->webhook_configuration['post_purchase_rest_method']}($subscription->webhook_configuration['post_purchase_url'],[
|
$response = $client->{$post_purchase_rest_method}($post_purchase_url,[
|
||||||
RequestOptions::JSON => ['body' => $body], RequestOptions::ALLOW_REDIRECTS => false
|
RequestOptions::JSON => ['body' => $body], RequestOptions::ALLOW_REDIRECTS => false
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user