#niti -php
1 messages · Page 1 of 1 (latest)
@sharp belfry could you share the exact code you're using and the exact stack trace of the error?
Okay
Delete stripe api file code below
namespace Stripe\ApiOperations;
/**
- Trait for deletable resources. Adds a
delete()method to the class. - This trait should only be applied to classes that derive from StripeObject.
/
trait Delete
{
/*-
@param null|array $params
-
@param null|array|string $opts
-
@throws \Stripe\Exception\ApiErrorException if the request fails
-
@return static the deleted resource
*/
public function delete($params = null, $opts = null)
{
self::_validateParams($params);$url = instanceUrl();
list($response, $opts) = $this->_request('delete', $url, $params, $opts);
$this->refreshFrom($response, $opts);return $this;
}
}
-
@sharp belfry this means you're probably using an old version of our library from before it added static methods. Try retrieving it first then deleting it
$endpoint = \Stripe\WebhookEndpoint::retrieve($id);
$endpoint->delete();
cool!
One more thing how we can access using api the signing-secret key of any webhook