Hi,
Are there any payment methods on the customer level in the platform? So we can handle default payment method or store metadata of payment methods on the platform.
Are you talking about Checkout Defaults?
Please review implementation in the code:
vc-theme-b2b-vue/useUserCheckoutDefaults.ts at dev · VirtoCommerce/vc-theme-b2b-vue (github.com)
Also you can use Dynamic Properties:
Steps:
- Create dynamicproperties for contacts DefaultPayment
- By default property is empty
- When customer login to store - need to check property
{
contact(id:"3d5218ed-f223-4100-8c85-96802d1ae1c1"){
name
phones
organizations
{
items
{
id
name
}
}
dynamicProperties
{
name
value
}
}}
- Also you can update property from UX
mutation updateContact ($command: InputUpdateContactType!) {
updateContact (command: $command) {
name
dynamicProperties {
name
value
}
}
}
{"command": {
"id": "3d5218ed-f223-4100-8c85-96802d1ae1c1",
...
"dynamicProperties": [
{
"name": "DefaultPayment",
"value": "SomeId"
}
]
}}
Thanks for the reply @OlegoO.
I am looking for something like we can store payment cards metadata for each customer and then also we can assign default payment method for each customer.