Service - Payment Method Manager
Overview
Each payment method is handled by a Service - Payment Method (handlers) service, with Service - Payment Method Generic taking all new/simple payment methods.
The Payment Method Manager service handles shared orchestration of the Payment Method Handler services.
Repository
https://bitbucket.org/izara-market-products/izara-market-products-payment-method-manager/src/master/
DynamoDB tables
Standard Config Table Per Service
Configuration tags
{
configKey: "ProductGraphServiceName"
configTag: "ProductGraphServiceName"
configValue: xxx // eg: "ProductGraph"
}
{
configKey: "PaymentMethodHandlerService"
configTag: xxx // paymentMethodHandlerServiceNameTag, eg: "PaymentMethodGeneric"
configValue: {
serviceName: xxx // eg: "PaymentMethodGeneric", this is the actual deployed service name
}
}
paymentMethod
Records which Handler manages each payment method
{
paymentMethodId,
currencyId,
paymentMethodHandlerServiceNameTag
}
- partition key: paymentMethodId
- sort key: (none)
- all Handler services are expected to create a paymentMethod node in the shared Products graph
UserPaymentMethods
Records which Handler manages each user payment method
{
userPaymentMethodId
paymentMethodHandlerServiceNameTag
}
- partition key: userPaymentMethodId
- sort key: (none)
- all Handler services are expected to create a userPaymentMethod node in the shared Products graph
Complex Filter requests
- Not yet used at the Manager level, would send requests to all handlers, could perhaps setup to automatically pass on processLogical requests to all handlers, and not have a processLogical function in the Manager service
{
filterType: "managerPaymentMethod" //unique id is paymentMethodId
type: "group",
elements:
[
{
type: "logical",
logicalTag: "currencyId",
comparison: "equals",
value: "xx"
},
{
type: "complexFilter",
complexFilter: {
filterType: "paymentMethodProperty",
// see [[NPM module - Izara Core - Property Node|Complex Filter requests]]
}
},
{
type: "complexFilter",
complexFilter: {
filterType: "paymentMethodNameTranslation" //unique id is paymentMethodId
type: "group",
elements:
[
{
// see [[Service - Translations|Complex Filter requests]]
type: "logical",
logicalTag: "textTag_languageId_text",
resultType: "paymentMethod",
textTag: "paymentMethodName",
languageId: "en",
text: "Is a great term",
subjectIdentifierPropertyName: "paymentMethodId",
caseSensitive: true
},
]
}
},
...
]
}
{
filterType: "managerUserPaymentMethod" //unique id is userPaymentMethodId
type: "group",
elements:
[
{
type: "logical",
logicalTag: "paymentMethodId",
comparison: "equals",
value: "xx"
},
{
type: "complexFilter",
complexFilter: {
filterType: "managerPaymentMethod",
// see above
}
},
{
type: "complexFilter",
complexFilter: {
filterType: "userPaymentMethodProperty",
// see [[NPM module - Izara Core - Property Node|Complex Filter requests]]
}
},
{
type: "complexFilter",
complexFilter: {
filterType: "userPaymentMethodSaleProperty",
// see [[NPM module - Izara Core - Property Node|Complex Filter requests]]
}
},
...
]
}