You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 11, 2024. It is now read-only.
After upgrading to Simple Commerce & SC Digital Products to 5.0 from 4.0, when confirming a order payment, it doesn't create a metadata: download_url
CP Product (I have added a .zip file and made the asset downloadable):
My current config, this is how I add the product to the cart:
afterwards on Checkout page with Stripe:
{{ sc:checkout id="checkout-form" redirect="/checkout/thanks" }}
{{ if {sc:cart:rawGrandTotal} !== 0 }}
<!-- Stripe Elements -->
<script src="https://js.stripe.com/v3/"></script>
<script>
let stripe = Stripe('{{ stripe:config:key }}')
let elements = stripe.elements()
const card = elements.create('cardNumber')
card.mount('#card-details', {
placeholder: '',
})
const cardExpiry = elements.create('cardExpiry')
cardExpiry.mount('#card-expiry', {
placeholder: '',
})
const cardCvc = elements.create('cardCvc')
cardCvc.mount('#card-cvc', {
placeholder: '',
})
document.getElementById('checkout-form').addEventListener('submit', (e) => {
e.preventDefault()
document.getElementById('checkout-submit-button').disabled = true
stripe
.confirmCardPayment('{{ stripe:client_secret }}', {
payment_method: {
card: card,
billing_details: {
name: document.getElementById('name-on-card').value,
},
},
})
.then((result) => {
if (result.paymentIntent.status === 'succeeded') {
document.getElementById('stripePaymentMethod').value =
result
.paymentIntent.payment_method
document.getElementById('checkout-form').submit()
} else if (result.error) {
alert("There was an issue processing your payment: " +
result
.error)
document.getElementById('checkout-submit-button')
.disabled = false
}
})
.catch((error) => {
alert(
`Sorry, there was an issue with the payment details you provided.`)
document.getElementById('checkout-submit-button').disabled =
false
})
})
</script>
{{ /if }}
{{ /sc:checkout }}
then the payment is confirmed and I redirect to a checkout page, in the old 4.0 version it used to generate a download_url, however on 5.0 it doesn't generate anything for me to download, here is the order in CP after successful payment:
Description
After upgrading to Simple Commerce & SC Digital Products to 5.0 from 4.0, when confirming a order payment, it doesn't create a
metadata: download_url
CP Product (I have added a .zip file and made the asset downloadable):
My current config, this is how I add the product to the cart:
afterwards on Checkout page with Stripe:
then the payment is confirmed and I redirect to a checkout page, in the old 4.0 version it used to generate a
download_url
, however on 5.0 it doesn't generate anything for me to download, here is the order in CP after successful payment:the
.md
file:Steps to reproduce
Environment
The text was updated successfully, but these errors were encountered: