catch-of-the-day/stripe-webhook-bundle

处理 Stripe Webhooks 的 Symfony 2 扩展包。

安装次数: 47,911

依赖者: 0

建议者: 0

安全: 0

星标: 0

关注者: 27

分支: 2

类型:symfony-bundle

dev-master 2016-10-07 06:08 UTC

This package is not auto-updated.

Last update: 2024-09-18 07:31:34 UTC


README

处理 Stripe Webhooks 的 Symfony 2 扩展包。

特性

  • 从 Stripe Webhook 事件触发 Symfony 事件。

状态

工作进行中

安装

步骤 1

将 MRPStripeWebhookBundle 添加到您的 composer.json 文件中

{
	"require": {
		"mrp/stripe-webhook-bundle": "*"
	}
}

现在运行以下命令让 composer 下载扩展包

$ php composer.phar update mrp/stripe-webhook-bundle

步骤 2

在您的内核中启用此扩展包

<?php
// app/AppKernel.php
public function registerBundles()
{
	$bundles = array(
		// …
		new MRP\StripeWebhookBundle\MRPStripeWebhookBundle()
	);
}

步骤 3

导入 MRPStripeWebhookBundle 路由文件

在 YAML 格式下

# app/config/routing.yml
mrp_stripe_webhook:
	resources: "@MRPStripeWebhookBundle/Resources/config/routing/routing.yml"
	prefix: /

Webhooks

此扩展包接收 "/stripe-webhooks" 路径下的 webhook,并分发您可监听的事件。

例如:'charge.succeeded' 事件以 'mrp_stripe_webhook.charge.succeeded' 的形式分发。