/** * Creates an Simplify_Webhook object * @param array $hash a map of parameters; valid keys are:<dl style="padding-left:10px;"> * <dt><tt>url</tt></dt> <dd>Endpoint URL <strong>required </strong></dd></dl> * @param string publicKey Public key. If null, the value of static Simplify::$publicKey will be used * @param string privateKey Private key. If null, the value of static Simplify::$privateKey will be used * @return Webhook a Webhook object. */ public static function createWebhook($hash, $publicKey = null, $privateKey = null) { $instance = new Simplify_Webhook(); $instance->setAll($hash); $object = Simplify_PaymentsApi::createObject($instance, $publicKey, $privateKey); return $object; }
/** * Creates an Simplify_Webhook object * @param array $hash a map of parameters; valid keys are:<dl style="padding-left:10px;"> * <dt><tt>url</tt></dt> <dd>Endpoint URL <strong>required </strong></dd></dl> * @param $authentication - information used for the API call. If no value is passed the global keys Simplify::public_key and Simplify::private_key are used. <i>For backwards compatibility the public and private keys may be passed instead of the authentication object.<i/> * @return Webhook a Webhook object. */ public static function createWebhook($hash, $authentication = null) { $args = func_get_args(); $authentication = Simplify_PaymentsApi::buildAuthenticationObject($authentication, $args, 2); $instance = new Simplify_Webhook(); $instance->setAll($hash); $object = Simplify_PaymentsApi::createObject($instance, $authentication); return $object; }