email issue
-
Hi I have an issue with stripe plugin. I am in test mode and I am trying to test confirmation email, automatically sent to my client.
In debug section here is what happen:
[January 6, 2021 4:58 pm] – SUCCESS :Received event notification from Stripe. Event type: checkout.session.completed
[January 6, 2021 4:58 pm] – SUCCESS :
stdClass Object
(
[id] => evt_1I6fLSL83RhDS5GJeeTbVGs7
[object] => event
[api_version] => 2020-03-02
[created] => 1609952330
[data] => stdClass Object
(
[object] => stdClass Object
(
[id] => cs_test_a1YuvvNf4ChqGkJQgW5Uf2OLuwM95D0JuEtY4FlrXEePzZYHpFGAvhk9p4
[object] => checkout.session
[allow_promotion_codes] =>
[amount_subtotal] => 100000
[amount_total] => 100000
[billing_address_collection] =>
[cancel_url] => https://ilmarketingconfrank.it/canceled
[client_reference_id] =>
[currency] => eur
[customer] => cus_Ii5W6seuk8FrXP
[customer_email] =>
[livemode] =>
[locale] =>
[metadata] => stdClass Object
(
)[mode] => payment
[payment_intent] => pi_1I6fL3L83RhDS5GJKOGin4zT
[payment_method_types] => Array
(
[0] => card
)[payment_status] => paid
[setup_intent] =>
[shipping] =>
[shipping_address_collection] =>
[submit_type] =>
[subscription] =>
[success_url] => https://ilmarketingconfrank.it/success
[total_details] => stdClass Object
(
[amount_discount] => 0
[amount_tax] => 0
))
)
[livemode] =>
[pending_webhooks] => 1
[request] => stdClass Object
(
[id] =>
[idempotency_key] =>
)[type] => checkout.session.completed
)
[January 6, 2021 4:58 pm] – FAILURE :Client Reference ID could not be found. This notification cannot be processed.Please note that I’m using this HTML to create the button on my page:
<!– Load Stripe.js on your website. –>
<script src=”https://js.stripe.com/v3″></script><!– Create a button that your customers click to complete their purchase. Customize the styling to suit your branding. –>
<button
style=”background-color:#6772E5;color:#FFF;padding:8px 12px;border:0;border-radius:4px;font-size:1em”
id=”checkout-button-price_1I6fBtL83RhDS5GJoqiLnEmX”
role=”link”
type=”button”
>
Checkout
</button><div id=”error-message”></div>
<script>
(function() {
var stripe = Stripe(‘pk_test_51HCM1iL83RhDS5GJeuEQaYLudoeJYc76ws4TO5ek3KDCIjfSfTvLdzTiwPsVHSvzh1EOduw3wOufdxxOIyAAlQ0P00tp4BCkW3’);var checkoutButton = document.getElementById(‘checkout-button-price_1I6fBtL83RhDS5GJoqiLnEmX’);
checkoutButton.addEventListener(‘click’, function () {
/*
* When the customer clicks on the button, redirect
* them to Checkout.
*/
stripe.redirectToCheckout({
lineItems: [{price: ‘price_1I6fBtL83RhDS5GJoqiLnEmX’, quantity: 1}],
mode: ‘payment’,
/*
* Do not rely on the redirect to the successUrl for fulfilling
* purchases, customers may not always reach the success_url after
* a successful payment.
* Instead use one of the strategies described in
* https://stripe.com/docs/payments/checkout/fulfill-orders
*/
successUrl: ‘https://ilmarketingconfrank.it/success’,
cancelUrl: ‘https://ilmarketingconfrank.it/canceled’,
})
.then(function (result) {
if (result.error) {
/*
* IfredirectToCheckout
fails due to a browser or network
* error, display the localized error message to your customer.
*/
var displayError = document.getElementById(‘error-message’);
displayError.textContent = result.error.message;
}
});
});
})();
</script>Please could someone help me to solve this problem?
Thank you a lot !
- The topic ‘email issue’ is closed to new replies.