将电子邮件收据条带给客户

时间:2019-03-10 18:45:24

标签: php wordpress woocommerce stripe-payments

我希望Stripe在成功付款后自动通过电子邮件将收据发送给我的客户。

我有一个WooCommerce商店。

以下代码由Stripe提供:

// Set your secret key: remember to change this to your live secret key in production
// See your keys here: https://dashboard.stripe.com/account/apikeys  

\Stripe\Stripe::setApiKey("sk_test_4eC39HqLyjWDarjtT1zdp7dc");

$charge = \Stripe\Charge::create([
'amount' => 999,
'currency' => 'usd',
'source' => 'tok_visa',
'receipt_email' => 'jenny.rosen@example.com',
]);

我需要在哪里放置此代码?

0 个答案:

没有答案
相关问题