#DaanVDH

1 messages ยท Page 1 of 1 (latest)

hasty juniperBOT
heady jewel
#

Hi ๐Ÿ‘‹ sorry, but I don't immediately recognize CardAwaitNotification, would you mind pointing me to where you're seeing that?

violet lance
#
type PaymentIntentNextActionCardAwaitNotification struct {
    // The time that payment will be attempted. If customer approval is required, they need to provide approval before this time.
    ChargeAttemptAt int64 `json:"charge_attempt_at"`
    // For payments greater than INR 5000, the customer must provide explicit approval of the payment with their bank. For payments of lower amount, no customer action is required.
    CustomerApprovalRequired bool `json:"customer_approval_required"`
}
``` It's in the go SDK
#
type PaymentIntentNextAction struct {
    AlipayHandleRedirect            *PaymentIntentNextActionAlipayHandleRedirect            `json:"alipay_handle_redirect"`
    BoletoDisplayDetails            *PaymentIntentNextActionBoletoDisplayDetails            `json:"boleto_display_details"`
    CardAwaitNotification           *PaymentIntentNextActionCardAwaitNotification <------- Here       `json:"card_await_notification"`
vocal plinth
#

๐Ÿ‘‹ Hopping in to help!

violet lance
#

Good evening

vocal plinth
violet lance
#

I couldn't really find any info on this

vocal plinth
violet lance
#

What are the advantages or using the stripe.js library? I've already setup the RedirectToUrl logic like this:

                
if pi.NextAction != nil {
                    switch pi.NextAction.Type {
                    case stripe.PaymentIntentNextActionTypeRedirectToURL:
                        sm.RedirectUrl = pi.NextAction.RedirectToURL.URL
                        sm.RequiresAction = true
                        sm.RequiresRedirect = true
                    default:
                        sm.RequiresAction = false
                        sm.RequiresRedirect = false
                    }
                } else {
                    sm.RequiresAction = false
                    sm.RequiresRedirect = false
                }```
vocal plinth
#

If you want to expand to other payment method types it gets unwieldy to handle all the different possible actions yourself

violet lance
vocal plinth
#

I believe those are all ones that only emit redirect_to_url as a next_action and you're welcome to keep using this, but there are definitely other Payment Method types that require other actions

#

It's ultimately up to you - I do think you'll find it easier to use Stripe.js (we also document these flows better) but if manually redirecting is working for you then feel free ๐Ÿ‘

violet lance
vocal plinth
violet lance
vocal plinth
#

I don't know what WSS is, but if you're sending the raw card details to your server then you definitely need to be double checking your PCI compliance

violet lance
#

It's like HTTPS for web sockets, so everything is encrypted

vocal plinth
violet lance
#

I'll give it a good read, thanks for the help