Aatish Landge
Aatish Landge

Reputation: 39

How to send auto email to customer on successful payment using stripe SDK?

I am using below nuget package to take payment by stripe for our customers. https://github.com/nberardi/stripe-dotnet

We are taking payment by using "CreateCharge" method to take payment. Payment is taking successfully. I want to send receipt on email to user on successful payment. I upgrade the nuget package to 1.12.0 but not able to see parameters as given below which are in nuget library "https://github.com/nberardi/stripe-dotnet"

public StripeObject CreateCharge(decimal amount, string currency, string customerId, string cardId = null, string description = null, IDictionary metadata = null, bool capture = true, string statementDescriptor = null, string receiptEmail = null, string destination = null, decimal? applicationFee = null, IDictionary shipping = null)

instead, I can see only

public StripeObject CreateCharge(decimal amount, string currency, ICreditCard card, string description = null);

I want to send value in "string receiptEmail = null" but not get it even after upgrading the package to 1.12.0.

Can some please help me out by using the same NuGet package how can I send "receiptEmail" so stripe will send a receipt to a user on successful payment

Upvotes: 0

Views: 80

Answers (1)

Paul Asjes
Paul Asjes

Reputation: 5857

You are using a very outdated and unofficial version of stripe-dotnet. Here's the official package which is actually maintained by Stripe: https://github.com/stripe/stripe-dotnet

When using the latest official version you'll be able to add a receipt_email parameter to your Charge request.

Upvotes: 0

Related Questions