Service - Payment Method Generic: Difference between revisions

From Izara Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(14 intermediate revisions by 3 users not shown)
Line 1: Line 1:
= Overview =
= Overview =


Handler service for any otherwise un-handled payment methods.
Handler service for generic payment methods that give text instruction to buyer at completion of sale. userPaymentMethod is also handled by each Payment Method Handler because there will be unique settings depending on the Payment Method.


= Repository =
= Repository =


https://bitbucket.org/izara-market-products/izara-market-products-payment-method-generic/src/master/
https://bitbucket.org/izara-market-products/izara-market-products-payment-method-generic/src/master/
 
= Schemas =
= DynamoDB tables =
==ObjectSchemas==
 
===paymentMethodGeneric===
== [[Standard Config Table Per Service]] ==
*ExtendObjType:paymentMethod
 
=== Configuration tags ===
 
<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
configTag: "PaymentMethodHandlerServiceNameTag"
  "objectType": "paymentMethodGeneric",
configKey: "PaymentMethodHandlerServiceNameTag"
  "extendObjType": {
configValue: xxx // this own services ServiceNameTag, eg "PaymentMethodGeneric"
    "serviceTag": "PaymentMethodManager",
    "objectType": "paymentMethod"
  },
  "addOnDataStructure": [
    {
      "type": "propertyValue"
    }
  ],
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    },
    "dynamoDB": {
      "storageType": "dynamoDB",
      "tableName": "PaymentMethodRecords",
      "serviceTag": "PaymentMethodManager"
    }
  },
  "fieldNames": {},
  "generatedBy": "userGenerated"
}
}
</syntaxhighlight>
</syntaxhighlight>


=== userPaymentMethodGeneric ===
*ExtendObjType:userPaymentMethod
<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
configTag: "ProductGraphServiceName"
  "objectType": "userPaymentMethodGeneric",
configKey: "ProductGraphServiceName"
  "extendObjType": {
configValue: xxx // eg: "ProductGraph"
    "serviceTag": "PaymentMethodManager",
    "objectType": "userPaymentMethod"
  },
  "addOnDataStructure": [
    {
      "type": "propertyValue"
    }
  ],
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    },
    "dynamoDB": {
      "storageType": "dynamoDB",
      "tableName": "UserPaymentMethodsRecords",
      "serviceTag": "PaymentMethodManager"
    }
  },
  "fieldNames": {},
  "generatedBy": "userGenerated"
}
}
</syntaxhighlight>
</syntaxhighlight>
 
=== userPaymentMethodGenericSalePropertyValue ===
<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
configTag: "PaymentMethodManagerServiceName"
  "objectType": "userPaymentMethodGenericSalePropertyValue",
configKey: "PaymentMethodManagerServiceName"
  "addOnDataStructure": [
configValue: xxx // eg: "PaymentMethodManager"
    {
      "type": "translation"
    }
  ],
  "canDelete": true,
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "fieldNames": {
    "userPaymentMethodGenericSalePropertyValueId": {
      "type": "string",
      "requiredOnCreate": false,
      "optionalOnCreate": false,
      "canUpdate": false,
      "randomOnCreate": true,
      "validation": {
        "pattern": "^[a-zA-Z0-9-_]+$"
      },
      "storageResourceTags": [
        "graph"
      ]
    }
  },
  "identifiers": [
    {
      "type": "identifier",
      "fieldName": "userPaymentMethodGenericSalePropertyValueId"
    }
  ],
  "generatedBy": "userGenerated"
}
}
</syntaxhighlight>
</syntaxhighlight>
 
=== userPaymentMethodGenericSalePropertyLabel ===
= Graph database =  
 
== [[Service - Products Graph]]==
 
=== Nodes ===
 
<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
nodeLabel: "{PaymentMethodGenericLib.PAYMENTMETHOD_GRAPH_NODE_LABEL}", // "paymentMethod"
  "objectType": "userPaymentMethodGenericSalePropertyLabel",
schema: {
  "addOnDataStructure": [
identifier: true,
    {
restrictProperties: true,
      "type": "translation"
restrictRelationships: true,
    }
properties: {
  ],
paymentMethodId: {
  "canDelete": true,
identifier: true, // create unique id from translation
  "storageResources": {
},
    "graph": {
paymentMethodHandlerServiceNameTag: {
      "storageType": "graph",
immutable: true,
      "graphServerTag": "GraphHandler"
},
    }
currencyId: {
  },
immutable: true, // currently not have data model for allowing this to be changed, is immutable
  "fieldNames": {
},
    "userPaymentMethodGenericSalePropertyLabelId": {
},
      "type": "string",
}
      "requiredOnCreate": false,
      "optionalOnCreate": false,
      "canUpdate": false,
      "randomOnCreate": true,
      "validation": {
        "pattern": "^[a-zA-Z0-9-_]+$"
      },
      "storageResourceTags": [
        "graph"
      ]
    }
  },
  "identifiers": [
    {
      "type": "identifier",
      "fieldName": "userPaymentMethodGenericSalePropertyLabelId"
    }
  ],
  "generatedBy": "userGenerated"
}
}
</syntaxhighlight>
</syntaxhighlight>
 
'''property'''
=== paymentMethodGenericPropertyLabel ===
<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
nodeLabel: "{PaymentMethodGenericLib.USERPAYMENTMETHOD_GRAPH_NODE_LABEL}", // "userPaymentMethod"
  "objectType": "paymentMethodGenericPropertyLabel",
schema: {
  "addOnDataStructure": [
identifier: true,
    {
restrictProperties: true,
      "type": "translation"
restrictRelationships: true,
    }
properties: {
  ],
userPaymentMethodId: {
  "canDelete": true,
identifier: true, // create unique id from user and uniqueMessageId
  "storageResources": {
},
    "graph": {
paymentMethodHandlerServiceNameTag: {
      "storageType": "graph",
immutable: true,
      "graphServerTag": "GraphHandler"
},
    }
paymentMethodId: { // stored here to reduce queries finding matching methods, eg sellOffers
  },
immutable: true,
  "fieldNames": {
},
    "paymentMethodGenericPropertyLabelId": {
},
      "type": "string",
}
      "requiredOnCreate": false,
      "optionalOnCreate": false,
      "canUpdate": false,
      "randomOnCreate": true,
      "validation": {
        "pattern": "^[a-zA-Z0-9-_]+$"
      },
      "storageResourceTags": [
        "graph"
      ]
    }
  },
  "identifiers": [
    {
      "type": "identifier",
      "fieldName": "paymentMethodGenericPropertyLabelId"
    }
  ],
  "generatedBy": "userGenerated"
}
}
</syntaxhighlight>
</syntaxhighlight>
* adds a node between a user and a payment method
=== paymentMethodGenericPropertyValue ===
* this is the node linked to by sellOfferPlans
 
<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
nodeLabel: "{PaymentMethodGenericLib.PAYMENTMETHOD_GRAPH_NODE_LABEL}PropertyLabel",
  "objectType": "paymentMethodGenericPropertyValue",
}
  "addOnDataStructure": [
{
    {
nodeLabel: "{PaymentMethodGenericLib.PAYMENTMETHOD_GRAPH_NODE_LABEL}Property",
      "type": "translation"
    }
  ],
  "canDelete": true,
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "fieldNames": {
    "paymentMethodGenericPropertyValueId": {
      "type": "string",
      "requiredOnCreate": false,
      "optionalOnCreate": false,
      "canUpdate": false,
      "randomOnCreate": true,
      "validation": {
        "pattern": "^[a-zA-Z0-9-_]+$"
      },
      "storageResourceTags": [
        "graph"
      ]
    }
  },
  "identifiers": [
    {
      "type": "identifier",
      "fieldName": "paymentMethodGenericPropertyValueId"
    }
  ],
  "generatedBy": "userGenerated"
}
}
</syntaxhighlight>
</syntaxhighlight>
 
=== userPaymentMethodGenericPropertyLabel ===
<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
nodeLabel: "{PaymentMethodGenericLib.USERPAYMENTMETHOD_GRAPH_NODE_LABEL}PropertyLabel",
  "objectType": "userPaymentMethodGenericPropertyLabel",
}
  "addOnDataStructure": [
{
    {
nodeLabel: "{PaymentMethodGenericLib.USERPAYMENTMETHOD_GRAPH_NODE_LABEL}Property",
      "type": "translation"
    }
  ],
  "canDelete": true,
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "fieldNames": {
    "userPaymentMethodGenericPropertyLabelId": {
      "type": "string",
      "requiredOnCreate": false,
      "optionalOnCreate": false,
      "canUpdate": false,
      "randomOnCreate": true,
      "validation": {
        "pattern": "^[a-zA-Z0-9-_]+$"
      },
      "storageResourceTags": [
        "graph"
      ]
    }
  },
  "identifiers": [
    {
      "type": "identifier",
      "fieldName": "userPaymentMethodGenericPropertyLabelId"
    }
  ],
  "generatedBy": "userGenerated"
}
}
</syntaxhighlight>
</syntaxhighlight>
=== userPaymentMethodGenericPropertyValue ===
<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
nodeLabel: "{PaymentMethodGenericLib.USERPAYMENTMETHOD_SALE_PROPERTIES_GRAPH_TAG}PropertyLabel", // userPaymentMethodSalePropertyLabel
  "objectType": "userPaymentMethodGenericPropertyValue",
}
  "addOnDataStructure": [
{
    {
nodeLabel: "{PaymentMethodGenericLib.USERPAYMENTMETHOD_SALE_PROPERTIES_GRAPH_TAG}Property",
      "type": "translation"
    }
  ],
  "canDelete": true,
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "fieldNames": {
    "userPaymentMethodGenericPropertyValueId": {
      "type": "string",
      "requiredOnCreate": false,
      "optionalOnCreate": false,
      "canUpdate": false,
      "randomOnCreate": true,
      "validation": {
        "pattern": "^[a-zA-Z0-9-_]+$"
      },
      "storageResourceTags": [
        "graph"
      ]
    }
  },
  "identifiers": [
    {
      "type": "identifier",
      "fieldName": "userPaymentMethodGenericPropertyValueId"
    }
  ],
  "generatedBy": "userGenerated"
}
}
</syntaxhighlight>
</syntaxhighlight>
* see [[NPM module - Izara Core - Property Node|DataSchemaLib]]
* two sets of property nodes for userPaymentMethod, one for presentation properties (when browsing), paymentMethodSale for after sale, properties that get sent to the buyer, eg bank account number


=== Relationships ===
==RelationshipSchemas==


=== disabledPaymentMethodGenericPropertyValue ===
<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
relationshipType: "{PaymentMethodGenericLib.createIsPaymentMethodGraphRelationshipType()}", // "is_paymentMethod"
  "relationshipServiceTag": "PaymentMethodGeneric",
schema: {
  "fieldNames": {},
elementCanBeRemoved: false,
  "storageResources": {
allPropertiesImmutable: true,
    "graph": {
restrictProperties: true,
      "storageType": "graph",
properties: {
      "graphServerTag": "GraphHandler"
originTimestamp: //timestamp the request to create/change this relationship was sent
    }
},
  },
}
  "links": [
    {
      "storageResourceTags": [
        "graph"
      ],
      "from": {
        "objType": {
          "objectType": "paymentMethodGeneric",
          "serviceTag": "PaymentMethodGeneric"
        },
        "linkType": "one",
        "direction": "from",
        "requiredOnCreate": false,
        "handler": false
      },
      "to": {
        "objType": {
          "objectType": "paymentMethodGenericPropertyValue",
          "serviceTag": "PaymentMethodGeneric"
        },
        "linkType": "many",
        "direction": "to",
        "requiredOnCreate": false,
        "handler": false
      },
      "canDelete": false
    }
  ],
  "canMove": true
  "canChangeToRelTypes": [
        { 
          serviceTag:"PaymentMethodGeneric",
          relationshipTag: "hasPaymentMethodGenericPropertyValue"
        },
  ]
}
}
</syntaxhighlight>
</syntaxhighlight>
=== disabledUserPaymentMethodGenericPropertyValue ===
<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
relationshipType: "{PaymentMethodGenericLib.createIsUserPaymentMethodGraphRelationshipType()}", // "is_userPaymentMethod"
  "relationshipServiceTag": "PaymentMethodGeneric",
schema: {
  "fieldNames": {},
elementCanBeRemoved: false,
  "storageResources": {
allPropertiesImmutable: true,
    "graph": {
restrictProperties: true,
      "storageType": "graph",
properties: {
      "graphServerTag": "GraphHandler"
originTimestamp: //timestamp the request to create/change this relationship was sent
    }
},
  },
}
  "links": [
    {
      "storageResourceTags": [
        "graph"
      ],
      "from": {
        "objType": {
          "objectType": "userPaymentMethodGeneric",
          "serviceTag": "PaymentMethodGeneric"
        },
        "linkType": "one",
        "direction": "from",
        "requiredOnCreate": false,
        "handler": false
      },
      "to": {
        "objType": {
          "objectType": "userPaymentMethodGenericPropertyValue",
          "serviceTag": "PaymentMethodGeneric"
        },
        "linkType": "many",
        "direction": "to",
        "requiredOnCreate": false,
        "handler": false
      },
      "canDelete": false
    }
  ],
 
  "canMove": true
}
}
</syntaxhighlight>
</syntaxhighlight>
* not setup logic to disable userPaymentMethods at this time


=== disabledUserPaymentMethodGenericSalePropertyValue ===
<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
relationshipType: "has_{PaymentMethodGenericLib.PAYMENTMETHOD_GRAPH_NODE_LABEL}Property",
  "relationshipServiceTag": "PaymentMethodGeneric",
  "fieldNames": {},
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "links": [
    {
      "storageResourceTags": [
        "graph"
      ],
      "from": {
        "objType": {
          "objectType": "userPaymentMethodGeneric",
          "serviceTag": "PaymentMethodGeneric"
        },
        "linkType": "one",
        "direction": "from",
        "requiredOnCreate": false,
        "handler": false
      },
      "to": {
        "objType": {
          "objectType": "userPaymentMethodGenericSalePropertyValue",
          "serviceTag": "PaymentMethodGeneric"
        },
        "linkType": "many",
        "direction": "to",
        "requiredOnCreate": false,
        "handler": false
      },
      "canDelete": false
    }
  ],
  "canChangeToRelTypes": [
    {
      "serviceTag": "PaymentMethodGeneric",
      "relationshipTag": "hasUserPaymentMethodGenericSalePropertyValue"
    }
  ],
  "canMove": false
}
}
</syntaxhighlight>
=== hasPaymentMethodGenericPropertyValue ===
<syntaxhighlight lang="JavaScript">
{
{
relationshipType: "disabled_{PaymentMethodGenericLib.PAYMENTMETHOD_GRAPH_NODE_LABEL}Property",
  "relationshipServiceTag": "PaymentMethodGeneric",
  "fieldNames": {},
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "links": [
    {
      "storageResourceTags": [
        "graph"
      ],
      "from": {
        "objType": {
          "objectType": "paymentMethodGeneric",
          "serviceTag": "PaymentMethodGeneric"
        },
        "linkType": "one",
        "direction": "from",
        "requiredOnCreate": false,
        "handler": false
      },
      "to": {
        "objType": {
          "objectType": "paymentMethodGenericPropertyValue",
          "serviceTag": "PaymentMethodGeneric"
        },
        "linkType": "many",
        "direction": "to",
        "requiredOnCreate": true,
        "handler": false
      },
      "canDelete": false
    }
  ],
  "canChangeToRelTypes": [
    {
      "serviceTag": "PaymentMethodGeneric",
      "relationshipTag": "disabledPaymentMethodGenericPropertyValue"
    }
  ],
  "canMove": false
}
}
</syntaxhighlight>
=== hasUserPaymentMethodGenericPropertyValue ===
<syntaxhighlight lang="JavaScript">
{
{
relationshipType: "is_{PaymentMethodGenericLib.PAYMENTMETHOD_GRAPH_NODE_LABEL}PropertyLabel",
  "relationshipServiceTag": "PaymentMethodGeneric",
  "fieldNames": {},
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "links": [
    {
      "storageResourceTags": [
        "graph"
      ],
      "from": {
        "objType": {
          "objectType": "userPaymentMethodGeneric",
          "serviceTag": "PaymentMethodGeneric"
        },
        "linkType": "one",
        "direction": "from",
        "requiredOnCreate": false,
        "handler": false
      },
      "to": {
        "objType": {
          "objectType": "userPaymentMethodGenericPropertyValue",
          "serviceTag": "PaymentMethodGeneric"
        },
        "linkType": "many",
        "direction": "to",
        "requiredOnCreate": true,
        "handler": false
      },
      "canDelete": false
    }
  ],
  "canChangeToRelTypes": [
    {
      "serviceTag": "PaymentMethodGeneric",
      "relationshipTag": "disabledUserPaymentMethodGenericPropertyValue"
    }
  ],
  "canMove": false
}
}
</syntaxhighlight>
</syntaxhighlight>
 
=== hasUserPaymentMethodGenericSalePropertyValue ===
<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
relationshipType: "has_{PaymentMethodGenericLib.USERPAYMENTMETHOD_GRAPH_NODE_LABEL}Property",
  "relationshipServiceTag": "PaymentMethodGeneric",
  "fieldNames": {},
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "links": [
    {
      "storageResourceTags": [
        "graph"
      ],
      "from": {
        "objType": {
          "objectType": "userPaymentMethodGeneric",
          "serviceTag": "PaymentMethodGeneric"
        },
        "linkType": "one",
        "direction": "from",
        "requiredOnCreate": false,
        "handler": false
      },
      "to": {
        "objType": {
          "objectType": "userPaymentMethodGenericSalePropertyValue",
          "serviceTag": "PaymentMethodGeneric"
        },
        "linkType": "many",
        "direction": "to",
        "requiredOnCreate": true,
        "handler": false
      },
      "canDelete": false
    }
  ],
  "canChangeToRelTypes": [
    {
      "serviceTag": "PaymentMethodGeneric",
      "relationshipTag": "disabledUserPaymentMethodGenericSalePropertyValue"
    }
  ],
  "canMove": false
}
}
</syntaxhighlight>
=== isPaymentMethodGenericPropertyLabel ===
<syntaxhighlight lang="JavaScript">
{
{
relationshipType: "disabled_{PaymentMethodGenericLib.USERPAYMENTMETHOD_GRAPH_NODE_LABEL}Property",
  "relationshipServiceTag": "PaymentMethodGeneric",
  "fieldNames": {},
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "links": [
    {
      "storageResourceTags": [
        "graph"
      ],
      "from": {
        "objType": {
          "objectType": "paymentMethodGenericPropertyValue",
          "serviceTag": "PaymentMethodGeneric"
        },
        "linkType": "many",
        "direction": "from",
        "requiredOnCreate": true,
        "handler": false
      },
      "to": {
        "objType": {
          "objectType": "paymentMethodGenericPropertyLabel",
          "serviceTag": "PaymentMethodGeneric"
        },
        "linkType": "one",
        "direction": "to",
        "requiredOnCreate": false,
        "handler": false
      },
      "canDelete": false
    }
  ],
  "canMove": false
}
}
</syntaxhighlight>
=== isUserPaymentMethodGenericPropertyLabel ===
<syntaxhighlight lang="JavaScript">
{
{
relationshipType: "is_{PaymentMethodGenericLib.USERPAYMENTMETHOD_GRAPH_NODE_LABEL}PropertyLabel",
  "relationshipServiceTag": "PaymentMethodGeneric",
  "fieldNames": {},
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "links": [
    {
      "storageResourceTags": [
        "graph"
      ],
      "from": {
        "objType": {
          "objectType": "userPaymentMethodGenericPropertyValue",
          "serviceTag": "PaymentMethodGeneric"
        },
        "linkType": "many",
        "direction": "from",
        "requiredOnCreate": true,
        "handler": false
      },
      "to": {
        "objType": {
          "objectType": "userPaymentMethodGenericPropertyLabel",
          "serviceTag": "PaymentMethodGeneric"
        },
        "linkType": "one",
        "direction": "to",
        "requiredOnCreate": false,
        "handler": false
      },
      "canDelete": false
    }
  ],
  "canMove": false
}
}
</syntaxhighlight>
</syntaxhighlight>
=== isUserPaymentMethodGenericSalePropertyLabel ===
<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
relationshipType: "has_{PaymentMethodGenericLib.USERPAYMENTMETHOD_SALE_PROPERTIES_GRAPH_TAG}Property",
  "relationshipServiceTag": "PaymentMethodGeneric",
}
  "fieldNames": {},
{
  "storageResources": {
relationshipType: "disabled_{PaymentMethodGenericLib.USERPAYMENTMETHOD_SALE_PROPERTIES_GRAPH_TAG}Property",
    "graph": {
}
      "storageType": "graph",
{
      "graphServerTag": "GraphHandler"
relationshipType: "is_{PaymentMethodGenericLib.USERPAYMENTMETHOD_SALE_PROPERTIES_GRAPH_TAG}PropertyLabel",
    }
  },
  "links": [
    {
      "storageResourceTags": [
        "graph"
      ],
      "from": {
        "objType": {
          "objectType": "userPaymentMethodGenericSalePropertyValue",
          "serviceTag": "PaymentMethodGeneric"
        },
        "linkType": "many",
        "direction": "from",
        "requiredOnCreate": true,
        "handler": false
      },
      "to": {
        "objType": {
          "objectType": "userPaymentMethodGenericSalePropertyLabel",
          "serviceTag": "PaymentMethodGeneric"
        },
        "linkType": "one",
        "direction": "to",
        "requiredOnCreate": false,
        "handler": false
      },
      "canDelete": false
    }
  ],
  "canMove": false
}
}
</syntaxhighlight>
</syntaxhighlight>
* see [[NPM module - Izara Core - Property Node|DataSchemaLib]]
 


== Basic node schemas ==
== Basic node schemas ==
Line 221: Line 766:
<syntaxhighlight lang="JavaScript">
<syntaxhighlight lang="JavaScript">
{
{
filterType: "paymentMethod" //unique id is paymentMethodId
filterType: "handlerPaymentMethod" //unique id is paymentMethodId
type: "group",
type: "group",
elements:
elements:
Line 259: Line 804:
}
}
},
},
...
]
}
</syntaxhighlight>
<syntaxhighlight lang="JavaScript">
{
filterType: "handlerUserPaymentMethod" //unique id is userPaymentMethodId
type: "group",
elements:
[
{
type: "logical",
logicalTag: "paymentMethodId",
comparison: "equals",
value: "xx"
},
{
type: "complexFilter",
complexFilter: {
filterType: "paymentMethod",
// 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]]
}
},
...
...
]
]

Latest revision as of 08:54, 13 January 2026

Overview

Handler service for generic payment methods that give text instruction to buyer at completion of sale. userPaymentMethod is also handled by each Payment Method Handler because there will be unique settings depending on the Payment Method.

Repository

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

Schemas

ObjectSchemas

paymentMethodGeneric

  • ExtendObjType:paymentMethod
{
  "objectType": "paymentMethodGeneric",
  "extendObjType": {
    "serviceTag": "PaymentMethodManager",
    "objectType": "paymentMethod"
  },
  "addOnDataStructure": [
    {
      "type": "propertyValue"
    }
  ],
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    },
    "dynamoDB": {
      "storageType": "dynamoDB",
      "tableName": "PaymentMethodRecords",
      "serviceTag": "PaymentMethodManager"
    }
  },
  "fieldNames": {},
  "generatedBy": "userGenerated"
}

userPaymentMethodGeneric

  • ExtendObjType:userPaymentMethod
{
  "objectType": "userPaymentMethodGeneric",
  "extendObjType": {
    "serviceTag": "PaymentMethodManager",
    "objectType": "userPaymentMethod"
  },
  "addOnDataStructure": [
    {
      "type": "propertyValue"
    }
  ],
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    },
    "dynamoDB": {
      "storageType": "dynamoDB",
      "tableName": "UserPaymentMethodsRecords",
      "serviceTag": "PaymentMethodManager"
    }
  },
  "fieldNames": {},
  "generatedBy": "userGenerated"
}

userPaymentMethodGenericSalePropertyValue

{
  "objectType": "userPaymentMethodGenericSalePropertyValue",
  "addOnDataStructure": [
    {
      "type": "translation"
    }
  ],
  "canDelete": true,
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "fieldNames": {
    "userPaymentMethodGenericSalePropertyValueId": {
      "type": "string",
      "requiredOnCreate": false,
      "optionalOnCreate": false,
      "canUpdate": false,
      "randomOnCreate": true,
      "validation": {
        "pattern": "^[a-zA-Z0-9-_]+$"
      },
      "storageResourceTags": [
        "graph"
      ]
    }
  },
  "identifiers": [
    {
      "type": "identifier",
      "fieldName": "userPaymentMethodGenericSalePropertyValueId"
    }
  ],
  "generatedBy": "userGenerated"
}

userPaymentMethodGenericSalePropertyLabel

{
  "objectType": "userPaymentMethodGenericSalePropertyLabel",
  "addOnDataStructure": [
    {
      "type": "translation"
    }
  ],
  "canDelete": true,
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "fieldNames": {
    "userPaymentMethodGenericSalePropertyLabelId": {
      "type": "string",
      "requiredOnCreate": false,
      "optionalOnCreate": false,
      "canUpdate": false,
      "randomOnCreate": true,
      "validation": {
        "pattern": "^[a-zA-Z0-9-_]+$"
      },
      "storageResourceTags": [
        "graph"
      ]
    }
  },
  "identifiers": [
    {
      "type": "identifier",
      "fieldName": "userPaymentMethodGenericSalePropertyLabelId"
    }
  ],
  "generatedBy": "userGenerated"
}

property

paymentMethodGenericPropertyLabel

{
  "objectType": "paymentMethodGenericPropertyLabel",
  "addOnDataStructure": [
    {
      "type": "translation"
    }
  ],
  "canDelete": true,
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "fieldNames": {
    "paymentMethodGenericPropertyLabelId": {
      "type": "string",
      "requiredOnCreate": false,
      "optionalOnCreate": false,
      "canUpdate": false,
      "randomOnCreate": true,
      "validation": {
        "pattern": "^[a-zA-Z0-9-_]+$"
      },
      "storageResourceTags": [
        "graph"
      ]
    }
  },
  "identifiers": [
    {
      "type": "identifier",
      "fieldName": "paymentMethodGenericPropertyLabelId"
    }
  ],
  "generatedBy": "userGenerated"
}

paymentMethodGenericPropertyValue

{
  "objectType": "paymentMethodGenericPropertyValue",
  "addOnDataStructure": [
    {
      "type": "translation"
    }
  ],
  "canDelete": true,
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "fieldNames": {
    "paymentMethodGenericPropertyValueId": {
      "type": "string",
      "requiredOnCreate": false,
      "optionalOnCreate": false,
      "canUpdate": false,
      "randomOnCreate": true,
      "validation": {
        "pattern": "^[a-zA-Z0-9-_]+$"
      },
      "storageResourceTags": [
        "graph"
      ]
    }
  },
  "identifiers": [
    {
      "type": "identifier",
      "fieldName": "paymentMethodGenericPropertyValueId"
    }
  ],
  "generatedBy": "userGenerated"
}

userPaymentMethodGenericPropertyLabel

{
  "objectType": "userPaymentMethodGenericPropertyLabel",
  "addOnDataStructure": [
    {
      "type": "translation"
    }
  ],
  "canDelete": true,
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "fieldNames": {
    "userPaymentMethodGenericPropertyLabelId": {
      "type": "string",
      "requiredOnCreate": false,
      "optionalOnCreate": false,
      "canUpdate": false,
      "randomOnCreate": true,
      "validation": {
        "pattern": "^[a-zA-Z0-9-_]+$"
      },
      "storageResourceTags": [
        "graph"
      ]
    }
  },
  "identifiers": [
    {
      "type": "identifier",
      "fieldName": "userPaymentMethodGenericPropertyLabelId"
    }
  ],
  "generatedBy": "userGenerated"
}

userPaymentMethodGenericPropertyValue

{
  "objectType": "userPaymentMethodGenericPropertyValue",
  "addOnDataStructure": [
    {
      "type": "translation"
    }
  ],
  "canDelete": true,
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "fieldNames": {
    "userPaymentMethodGenericPropertyValueId": {
      "type": "string",
      "requiredOnCreate": false,
      "optionalOnCreate": false,
      "canUpdate": false,
      "randomOnCreate": true,
      "validation": {
        "pattern": "^[a-zA-Z0-9-_]+$"
      },
      "storageResourceTags": [
        "graph"
      ]
    }
  },
  "identifiers": [
    {
      "type": "identifier",
      "fieldName": "userPaymentMethodGenericPropertyValueId"
    }
  ],
  "generatedBy": "userGenerated"
}

RelationshipSchemas

disabledPaymentMethodGenericPropertyValue

{
  "relationshipServiceTag": "PaymentMethodGeneric",
  "fieldNames": {},
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "links": [
    {
      "storageResourceTags": [
        "graph"
      ],
      "from": {
        "objType": {
          "objectType": "paymentMethodGeneric",
          "serviceTag": "PaymentMethodGeneric"
        },
        "linkType": "one",
        "direction": "from",
        "requiredOnCreate": false,
        "handler": false
      },
      "to": {
        "objType": {
          "objectType": "paymentMethodGenericPropertyValue",
          "serviceTag": "PaymentMethodGeneric"
        },
        "linkType": "many",
        "direction": "to",
        "requiredOnCreate": false,
        "handler": false
      },
      "canDelete": false
    }
  ],
  "canMove": true
  "canChangeToRelTypes": [
        {  
          serviceTag:"PaymentMethodGeneric",
          relationshipTag: "hasPaymentMethodGenericPropertyValue"
        },
   ]
}


disabledUserPaymentMethodGenericPropertyValue

{
  "relationshipServiceTag": "PaymentMethodGeneric",
  "fieldNames": {},
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "links": [
    {
      "storageResourceTags": [
        "graph"
      ],
      "from": {
        "objType": {
          "objectType": "userPaymentMethodGeneric",
          "serviceTag": "PaymentMethodGeneric"
        },
        "linkType": "one",
        "direction": "from",
        "requiredOnCreate": false,
        "handler": false
      },
      "to": {
        "objType": {
          "objectType": "userPaymentMethodGenericPropertyValue",
          "serviceTag": "PaymentMethodGeneric"
        },
        "linkType": "many",
        "direction": "to",
        "requiredOnCreate": false,
        "handler": false
      },
      "canDelete": false
    }
  ],
   
  "canMove": true
}



disabledUserPaymentMethodGenericSalePropertyValue

{
  "relationshipServiceTag": "PaymentMethodGeneric",
  "fieldNames": {},
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "links": [
    {
      "storageResourceTags": [
        "graph"
      ],
      "from": {
        "objType": {
          "objectType": "userPaymentMethodGeneric",
          "serviceTag": "PaymentMethodGeneric"
        },
        "linkType": "one",
        "direction": "from",
        "requiredOnCreate": false,
        "handler": false
      },
      "to": {
        "objType": {
          "objectType": "userPaymentMethodGenericSalePropertyValue",
          "serviceTag": "PaymentMethodGeneric"
        },
        "linkType": "many",
        "direction": "to",
        "requiredOnCreate": false,
        "handler": false
      },
      "canDelete": false
    }
  ],
  "canChangeToRelTypes": [
    {
      "serviceTag": "PaymentMethodGeneric",
      "relationshipTag": "hasUserPaymentMethodGenericSalePropertyValue"
    }
  ],
  "canMove": false
}

hasPaymentMethodGenericPropertyValue

{
  "relationshipServiceTag": "PaymentMethodGeneric",
  "fieldNames": {},
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "links": [
    {
      "storageResourceTags": [
        "graph"
      ],
      "from": {
        "objType": {
          "objectType": "paymentMethodGeneric",
          "serviceTag": "PaymentMethodGeneric"
        },
        "linkType": "one",
        "direction": "from",
        "requiredOnCreate": false,
        "handler": false
      },
      "to": {
        "objType": {
          "objectType": "paymentMethodGenericPropertyValue",
          "serviceTag": "PaymentMethodGeneric"
        },
        "linkType": "many",
        "direction": "to",
        "requiredOnCreate": true,
        "handler": false
      },
      "canDelete": false
    }
  ],
  "canChangeToRelTypes": [
    {
      "serviceTag": "PaymentMethodGeneric",
      "relationshipTag": "disabledPaymentMethodGenericPropertyValue"
    }
  ],
  "canMove": false
}

hasUserPaymentMethodGenericPropertyValue

{
  "relationshipServiceTag": "PaymentMethodGeneric",
  "fieldNames": {},
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "links": [
    {
      "storageResourceTags": [
        "graph"
      ],
      "from": {
        "objType": {
          "objectType": "userPaymentMethodGeneric",
          "serviceTag": "PaymentMethodGeneric"
        },
        "linkType": "one",
        "direction": "from",
        "requiredOnCreate": false,
        "handler": false
      },
      "to": {
        "objType": {
          "objectType": "userPaymentMethodGenericPropertyValue",
          "serviceTag": "PaymentMethodGeneric"
        },
        "linkType": "many",
        "direction": "to",
        "requiredOnCreate": true,
        "handler": false
      },
      "canDelete": false
    }
  ],
  "canChangeToRelTypes": [
    {
      "serviceTag": "PaymentMethodGeneric",
      "relationshipTag": "disabledUserPaymentMethodGenericPropertyValue"
    }
  ],
  "canMove": false
}

hasUserPaymentMethodGenericSalePropertyValue

{
  "relationshipServiceTag": "PaymentMethodGeneric",
  "fieldNames": {},
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "links": [
    {
      "storageResourceTags": [
        "graph"
      ],
      "from": {
        "objType": {
          "objectType": "userPaymentMethodGeneric",
          "serviceTag": "PaymentMethodGeneric"
        },
        "linkType": "one",
        "direction": "from",
        "requiredOnCreate": false,
        "handler": false
      },
      "to": {
        "objType": {
          "objectType": "userPaymentMethodGenericSalePropertyValue",
          "serviceTag": "PaymentMethodGeneric"
        },
        "linkType": "many",
        "direction": "to",
        "requiredOnCreate": true,
        "handler": false
      },
      "canDelete": false
    }
  ],
  "canChangeToRelTypes": [
    {
      "serviceTag": "PaymentMethodGeneric",
      "relationshipTag": "disabledUserPaymentMethodGenericSalePropertyValue"
    }
  ],
  "canMove": false
}

isPaymentMethodGenericPropertyLabel

{
  "relationshipServiceTag": "PaymentMethodGeneric",
  "fieldNames": {},
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "links": [
    {
      "storageResourceTags": [
        "graph"
      ],
      "from": {
        "objType": {
          "objectType": "paymentMethodGenericPropertyValue",
          "serviceTag": "PaymentMethodGeneric"
        },
        "linkType": "many",
        "direction": "from",
        "requiredOnCreate": true,
        "handler": false
      },
      "to": {
        "objType": {
          "objectType": "paymentMethodGenericPropertyLabel",
          "serviceTag": "PaymentMethodGeneric"
        },
        "linkType": "one",
        "direction": "to",
        "requiredOnCreate": false,
        "handler": false
      },
      "canDelete": false
    }
  ],
  "canMove": false
}

isUserPaymentMethodGenericPropertyLabel

{
  "relationshipServiceTag": "PaymentMethodGeneric",
  "fieldNames": {},
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "links": [
    {
      "storageResourceTags": [
        "graph"
      ],
      "from": {
        "objType": {
          "objectType": "userPaymentMethodGenericPropertyValue",
          "serviceTag": "PaymentMethodGeneric"
        },
        "linkType": "many",
        "direction": "from",
        "requiredOnCreate": true,
        "handler": false
      },
      "to": {
        "objType": {
          "objectType": "userPaymentMethodGenericPropertyLabel",
          "serviceTag": "PaymentMethodGeneric"
        },
        "linkType": "one",
        "direction": "to",
        "requiredOnCreate": false,
        "handler": false
      },
      "canDelete": false
    }
  ],
  "canMove": false
}

isUserPaymentMethodGenericSalePropertyLabel

{
  "relationshipServiceTag": "PaymentMethodGeneric",
  "fieldNames": {},
  "storageResources": {
    "graph": {
      "storageType": "graph",
      "graphServerTag": "GraphHandler"
    }
  },
  "links": [
    {
      "storageResourceTags": [
        "graph"
      ],
      "from": {
        "objType": {
          "objectType": "userPaymentMethodGenericSalePropertyValue",
          "serviceTag": "PaymentMethodGeneric"
        },
        "linkType": "many",
        "direction": "from",
        "requiredOnCreate": true,
        "handler": false
      },
      "to": {
        "objType": {
          "objectType": "userPaymentMethodGenericSalePropertyLabel",
          "serviceTag": "PaymentMethodGeneric"
        },
        "linkType": "one",
        "direction": "to",
        "requiredOnCreate": false,
        "handler": false
      },
      "canDelete": false
    }
  ],
  "canMove": false
}


Basic node schemas

{
	nodeLabel: "{PaymentMethodGenericLib.PAYMENTMETHOD_GRAPH_NODE_LABEL}", // "paymentMethod"
	schema: {
		identifier: true,
		restrictProperties: true,
		restrictRelationships: true,
		properties: {
			paymentMethodId: {
				identifier: true,
			},
			paymentMethodHandlerServiceNameTag: {
				immutable: true,
			},
		},
	}
}

Schema comes from BasicNodeSchemaLib

  1. paymentMethodPropertyLabel
  2. paymentMethodProperty
  3. paymentMethodSalePropertyLabel
  4. paymentMethodSaleProperty

Complex Filter requests

{
	filterType: "handlerPaymentMethod" //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: "handlerUserPaymentMethod" //unique id is userPaymentMethodId
	type: "group",
	elements:
	[
		{
			type: "logical",
			logicalTag: "paymentMethodId",
			comparison: "equals",
			value: "xx"
		},
		{
			type: "complexFilter",
			complexFilter: {
				filterType: "paymentMethod",
				// 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]]
			}
		},
		...
	]
}

Data structure notes

  • Users can create new paymentMethods which are uniquely identified by their translation
  • Users can create userPaymentMethod nodes for their account which connect to paymentMethods, one user can have multiple userPaymentMethod links to the same paymentMethod, eg different Bank Transfer nodes for different bank accounts, which can be applied to sell offers in any combination

Working documents

Payment Method Generic