允许删除Adyen Drop的保存信用卡信息
我正在使用样本.NET代码进行使用Adyen付款的POC。 目前,我正在努力配置Dropin Checkout。
我能够允许保存信用卡信息,添加enablestoredEtails
属性到结帐。
我看到还有另一个属性showRemovePaymentMethodButton
,我相信它将用于从drop中删除保存的信用卡信息,但是当我添加该属性的
正确方法是允许用户的正确方法 时,没有任何变化要在Dropin Checkout上删除保存的信用卡信息?
这是我正在处理的代码的一部分:
return new AdyenCheckout(
{
clientKey,
locale: "en_US",
environment: "test",
session: session,
showPayButton: true,
paymentMethodsConfiguration: {
ideal: {
showImage: true,
},
card: {
hasHolderName: true,
holderNameRequired: true,
name: "Credit or debit card",
amount: {
value: 2000,
currency: "USD",
},
enableStoreDetails: true,
showRemovePaymentMethodButton: true
},
paypal: {
amount: {
value: 1000,
currency: "USD",
},
environment: "test", // Change this to "live" when you're ready to accept live PayPal payments
countryCode: "US", // Only needed for test. This will be automatically retrieved when you are in production.
},
},
I am working on a POC with Adyen payments using the sample .Net code.
Currently I am working on configuring the DropIn checkout.
I was able to allow save credit card info adding the enableStoreDetails
attribute to the checkout.
I see that there is another attribute showRemovePaymentMethodButton
and I believe it would be used to remove saved credit card info from the Drop In, but nothing changes when I add that attribute
What is the correct way of allowing a user to remove a saved credit card info at the DropIn checkout?
This is part of the code I am working on:
return new AdyenCheckout(
{
clientKey,
locale: "en_US",
environment: "test",
session: session,
showPayButton: true,
paymentMethodsConfiguration: {
ideal: {
showImage: true,
},
card: {
hasHolderName: true,
holderNameRequired: true,
name: "Credit or debit card",
amount: {
value: 2000,
currency: "USD",
},
enableStoreDetails: true,
showRemovePaymentMethodButton: true
},
paypal: {
amount: {
value: 1000,
currency: "USD",
},
environment: "test", // Change this to "live" when you're ready to accept live PayPal payments
countryCode: "US", // Only needed for test. This will be automatically retrieved when you are in production.
},
},
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
回调OnDisableStoredPaymentMethod(...)也需要包含在Dropin中。根据文档:OnDisableStoredPaymentMethod(StordPaymentMethodID,Resolve,recult)删除了存储的付款方法(需要在homecontroller.cs中工作以支持 /disable端点)。当购物者删除存储的付款方式时,这就是称为。要删除所选的付款方式,请使用StorePaymentMethodID进行A /禁用请求。然后根据 /禁用响应来调用Resolve()或recond()。
有关更多信息( https://docs.adyen。 com/inline-payments/dokenization/toking-tokens#disable存储details )和/或高级用例,您可以在此处找到更多信息: https://docs.adyen.com/online-payments/web-drop-in/web-drop-in/optional-configuration
希望有帮助!
编辑/添加示例:
The callback onDisableStoredPaymentMethod(...) also needs to be included in the Dropin. According to the documentation: onDisableStoredPaymentMethod(storedPaymentMethodId, resolve, reject) removes the stored payment method (requires work in the HomeController.cs to support the /disable endpoint). This is called when a shopper removes a stored payment method. To remove the selected payment method, make a /disable request using the storedPaymentMethodId. Then call either resolve() or reject(), depending on the /disable response.
For more information (https://docs.adyen.com/online-payments/tokenization/managing-tokens#disable-stored-details) and/or advanced use-cases, you can find more information here: https://docs.adyen.com/online-payments/web-drop-in/optional-configuration
Hope that helped!
Edit/added example: