Implemented Payment plugin development

More
2 weeks 5 days ago #3288 by Ruediger Schultz
Payment plugin development was created by Ruediger Schultz
Hey Ruud,
You might remember that I tried to create my own payment plugin due to some legal restriction (utilising Digistore24.com as payment provider). I did not come around to this issue for a few months, but now found time to look at it again. I do have a path to implement this (forked from the "paylater" plugin).
However, I have two issues I cannot figure out - maybe you can direct me towards the answer:

1) (serious issue):
My plugin is named "Digistore24" and I renamed ALL occurencies to this name. The plugin does indeed work, but upon the task "payment.response" I get an erronious "processor name":

checkout/payment?task=payment.response&processor=digistore&order=xxx
instead of 
checkout/payment?task=payment.response&processor=digistore24&order=xxx

This causes the plugin to fail with a debug log entry:
2025-06-24T08:23:51+00:00    ERROR xx.xxx.xxx.xxx    ochsubscriptions    Unauthorised access blocked to Payment Return. [digistore]

I do not find any hint, as to WHERE the "24" is stripped from the processor name. Any ideas?

2) (minor)
Is there a "trick" to include dynamic content (from my database) into the page template? Can I create my own dynamic parameters and fill them with my own database resposes?






 
The topic has been locked.
More
2 weeks 5 days ago #3289 by Ruediger Schultz
Replied by Ruediger Schultz on topic Payment plugin development
Please ignore the second issue - I just might have found a solution...
The topic has been locked.
More
2 weeks 5 days ago #3290 by Ruud van Lent
Replied by Ruud van Lent on topic Payment plugin development

Hey Ruud,
You might remember that I tried to create my own payment plugin due to some legal restriction (utilising Digistore24.com as payment provider). I did not come around to this issue for a few months, but now found time to look at it again. I do have a path to implement this (forked from the "paylater" plugin).
However, I have two issues I cannot figure out - maybe you can direct me towards the answer:

1) (serious issue):
My plugin is named "Digistore24" and I renamed ALL occurencies to this name. The plugin does indeed work, but upon the task "payment.response" I get an erronious "processor name":

checkout/payment?task=payment.response&processor=digistore&order=xxx
instead of 
checkout/payment?task=payment.response&processor=digistore24&order=xxx

This causes the plugin to fail with a debug log entry:
2025-06-24T08:23:51+00:00    ERROR xx.xxx.xxx.xxx    ochsubscriptions    Unauthorised access blocked to Payment Return. [digistore]

I do not find any hint, as to WHERE the "24" is stripped from the processor name. Any ideas?

 

Hi Ruediger,
Yes I have any idea :)
this is stripped in the ./component/com_ochsubscriptions/src/Controller/PaymentController

You need to search for:
Code:
input->get('processor'

and on the found lines (4 active), place the filter value 'word' with 'cmd' > so it should be input->get('processor', null, 'cmd')

I always filter as restrictive as possible. I will also change that on the next release (not planned yet), so your changes will not get overwritten.

note: untested :)
The topic has been locked.
More
2 weeks 5 days ago #3291 by Ruediger Schultz
Replied by Ruediger Schultz on topic Payment plugin development
Thank you!
that answer actually fits with my own (temporary) fix (done in the "response" function of that "PaymentController.php"

I really appreciate, if you eventually replace the "word" filter with "cmd" filter (NO hurry though!!!)
Have a good day!
Ruediger

Please consider this topic solved! 
The topic has been locked.
More
2 weeks 4 days ago #3292 by Ruud van Lent
Replied by Ruud van Lent on topic Payment plugin development
Top! and consider it done :)
The topic has been locked.
More
4 days 6 hours ago #3293 by Ruud van Lent
Replied by Ruud van Lent on topic Payment plugin development
this is implemented in release 4.4.1
The topic has been locked.