#Khan Masroof

1 messages · Page 1 of 1 (latest)

loud glacierBOT
steady fulcrum
#

Which email are you referring to?

scarlet wraith
#

when someone buys a product through samcart and makes payment through stripe the stripe sends an email to us in which all details related to product must come

steady fulcrum
#

Not possible to configure those to include product details I'm afraid

#

You'd need to implement your own email solution

scarlet wraith
#

but we are receiving on full payment products

#

it happens over recurring payments

steady fulcrum
#

Yep, if you need that you'll ned to build it yourself

scarlet wraith
#

where?

steady fulcrum
#

I guess you'd listen for webhook events and trigger the emails using a third-party email service

scarlet wraith
#

zapier?

steady fulcrum
#

That's not an email service, but you could use Zapier to connect Stripe events to a service like Postmark yes

scarlet wraith
#

how would i set up a webhook

steady fulcrum
scarlet wraith
#

$payload = @file_get_contents('php://input');
$event = null;

try {
$event = \Stripe\Event::constructFrom(
json_decode($payload, true)
);
} catch(\UnexpectedValueException $e) {
// Invalid payload
http_response_code(400);
exit();
}

// Handle the event
switch ($event->type) {
case 'payment_intent.succeeded':
$paymentIntent = $event->data->object; // contains a \Stripe\PaymentIntent
// Then define and call a method to handle the successful payment intent.
// handlePaymentIntentSucceeded($paymentIntent);
break;
case 'payment_method.attached':
$paymentMethod = $event->data->object; // contains a \Stripe\PaymentMethod
// Then define and call a method to handle the successful attachment of a PaymentMethod.
// handlePaymentMethodAttached($paymentMethod);
break;
// ... handle other event types
default:
echo 'Received unknown event type ' . $event->type;
}

http_response_code(200);

steady fulcrum
#

What are you showing me here?

scarlet wraith
#

what will be the url for webhook

steady fulcrum
#

That would be the server where you host the endpoint for that code you shared

loud glacierBOT
scarlet wraith
#

is ther anu other way to recieve that emails

eternal mulch
#

Hi! I'm taking over this thread.

#

Can you clarify your question? I'm not sure I follow.

scarlet wraith
#

Actually i want to say the email we are recieving from stripe doesn;t came up with all the details regarding purchase

eternal mulch
#

Like ynnoj said, if you want more info in the emails, then you'll need to build/send the emails yourself.

scarlet wraith
#

where i should set up

eternal mulch
#

That's completely up to you and unrelated to Stripe.