adjustment for string methods
This commit is contained in:
parent
7dbe870ce0
commit
39db18f532
1 changed files with 5 additions and 1 deletions
|
|
@ -37,9 +37,13 @@ trait SubscriptionHooker
|
|||
|
||||
nlog("method name must be a string");
|
||||
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 {
|
||||
$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
|
||||
]);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue