To support multiple payment methods, split shared functionality (logos, currency functions, hash generation) to a shared commerce_dps module which others (commerce_dps_pxpay, commerce_dps_pxfusion, commerce_dps_pxpost) can depend on.

Comments

xurizaemon’s picture

heathstannard’s picture

Status: Active » Needs review
StatusFileSize
new18.81 KB

Patch for creation of commerce_dps module.

Only includes an updated shared image & available currencies but could include extra functions in the future such as generating merchant references - although I think for now it's a good idea to leave these in the sub-modules as each may wish to implement a different merchant ref.

When this module is in place we can look at updating the sub-modules to depend on this module and use the included functions/files.

garethhallnz’s picture

I was thinking we should write a DPS payment class with an interface that each submodule implements. That way when D8 comes along we only need to deal with minimal routing and hook changes.

That way pxpay, pxfusion, pxpost and account2account can all implement their own classes and extend the dps interface.

xurizaemon’s picture

Issue summary: View changes
StatusFileSize
new6.2 KB

I like that concept, Gareth. For now I'm just going to add a .inc based on Heath's submission, we don't even need a module to depend on since we can just refer to the file.

xurizaemon’s picture

Issue summary: View changes

Whoops half my comment ended up in the description.

Heath I might create a separate issue for the new paymentexpress.png you've added here.

  • xurizaemon committed 9554577 on 7.x-1.x
    Issue #2266829. Share functionality btw DPS methods.
    
xurizaemon’s picture

Status: Needs review » Fixed

Fixed. Heath the .png change didn't come in as part of this - do you want to submit as a separate isssue if it's still something needs to happen?

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.