ello, im trying to modify blue pay plugin, with other payment type. This type after payment needs function like processResponse() to post data, but for me nothings happens. Endpoint calls the class, because if i echo something in __construct function its shows. Echo processResponse() dosent do anything. I understand that i need to set up some details in services, but what and how? Now im using this code `
namespace Jigoshop\Extension\BluepayGateway;
use Jigoshop\Integration;
use Jigoshop\Container;
use Jigoshop\Container\Services;
use Jigoshop\Container\Tags;
use Jigoshop\Container\Triggers;
use Jigoshop\Container\Factories;
class Common
{
public function __construct()
{
Integration::addPsr4Autoload(__NAMESPACE__ . '\\', __DIR__);
Integration\Helper\Render::addLocation('blue_pay', JIGOSHOP_PAYSERA_GATEWAY_DIR);
$di = Integration::getService('di');
$di->services->setDetails('jigoshop.payment.blue_pay', __NAMESPACE__ . '\\Common\\Method', array(
'jigoshop.options',
'jigoshop.service.cart',
'jigoshop.service.order',
'jigoshop.messages',
));
$di = Integration::getService('di');
$di->triggers->add('jigoshop.service.payment', 'addMethod', array('jigoshop.payment.blue_pay'));
}
}
new Common();`
Thanks to Jigoshop developers i got an answer.
Create class:
class Endpoint implements \Jigoshop\Endpoint\Processable
{
public function processResponse()
{
//Your Code here
}
}
and in Common class constuctor insert:
$di->services->setDetails('jigoshop.endpoint.blue_pay', __NAMESPACE__ . '\\Common\\Endpoint', []);
And to get endpoint url use this:
\Jigoshop\Helper\Endpoint::getUrl('blue_pay');