Service - Payment Method Generic

From Izara Wiki
Revision as of 09:43, 18 October 2021 by Sven the Barbarian (talk | contribs) (Created page with "= Overview = Handler service for any otherwise un-handled payment methods. = Repository = https://bitbucket.org/izara-market-products/izara-market-products-payment-method-g...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Overview

Handler service for any otherwise un-handled payment methods.

Repository

https://bitbucket.org/izara-market-products/izara-market-products-payment-method-generic/src/master/

DynamoDB tables

Standard Config Table Per Service

Configuration tags

{
	configTag: "PaymentMethodHandlerServiceNameTag"
	configKey: "PaymentMethodHandlerServiceNameTag"
	configValue: xxx // this own services ServiceNameTag, eg "PaymentMethodGeneric"
}
{
	configTag: "ProductGraphServiceName"
	configKey: "ProductGraphServiceName"
	configValue: xxx // eg: "ProductGraph"
}
{
	configTag: "PaymentMethodManagerServiceName"
	configKey: "PaymentMethodManagerServiceName"
	configValue: xxx // eg: "PaymentMethodManager"
}

Graph database

Service - Products Graph

Nodes

{
	nodeLabel: "{PaymentMethodGenericLib.PAYMENTMETHOD_GRAPH_NODE_LABEL}", // "paymentMethod"
	schema: {
		identifier: true,
		restrictProperties: true,
		restrictRelationships: true,
		properties: {
			paymentMethodId: {
				identifier: true, // create unique id from translation
			},
			paymentMethodHandlerServiceNameTag: {
				immutable: true,
			},
		},
	}
}
{
	nodeLabel: "{PaymentMethodGenericLib.USERPAYMENTMETHOD_GRAPH_NODE_LABEL}", // "userPaymentMethod"
	schema: {
		identifier: true,
		restrictProperties: true,
		restrictRelationships: true,
		properties: {
			userPaymentMethodId: {
				identifier: true, // create unique id from user and uniqueMessageId
			},
			paymentMethodHandlerServiceNameTag: {
				immutable: true,
			},
			paymentMethodId: { // stored here to reduce queries finding matching methods, eg sellOffers
				immutable: true,
			},
		},
	}
}
  • adds a node between a user and a payment method
  • this is the node linked to by sellOffers

Relationships

{
	relationshipType: "{PaymentMethodGenericLib.createIsPaymentMethodGraphRelationshipType()}", // "isPaymentMethod"
	schema: {
		elementCanBeRemoved: false,
		allPropertiesImmutable: true,
		restrictProperties: true,
		properties: {
			originTimestamp: //timestamp the request to create/change this relationship was sent
		},
	}
}

Working documents

Payment Method Generic