File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 66namespace Omnipay \Eway ;
77
88use Omnipay \Common \AbstractGateway ;
9+ use Omnipay \Omnipay ;
910
1011/**
1112 * eWAY Rapid Transparent Redirect Gateway
@@ -64,6 +65,13 @@ public function setPassword($value)
6465
6566 public function purchase (array $ parameters = array ())
6667 {
68+ if (!empty ($ parameters ['cardTransactionType ' ]) && $ parameters ['cardTransactionType ' ] === 'continuous ' ) {
69+ $ gateway = Omnipay::create ('Eway_RapidDirect ' );
70+ $ gateway ->setApiKey ($ this ->getApiKey ());
71+ $ gateway ->setPassword ($ this ->getPassword ());
72+ $ gateway ->setTestMode ($ this ->getTestMode ());
73+ return $ gateway ->createRequest ('\Omnipay\Eway\Message\RapidDirectPurchaseRequest ' , $ parameters );
74+ }
6775 return $ this ->createRequest ('\Omnipay\Eway\Message\RapidPurchaseRequest ' , $ parameters );
6876 }
6977
Original file line number Diff line number Diff line change 66namespace Omnipay \Eway ;
77
88use Omnipay \Common \AbstractGateway ;
9+ use Omnipay \Omnipay ;
910
1011/**
1112 * eWAY Rapid Responsive Shared Page Gateway
@@ -61,6 +62,13 @@ public function setPassword($value)
6162
6263 public function purchase (array $ parameters = array ())
6364 {
65+ if (!empty ($ parameters ['cardTransactionType ' ]) && $ parameters ['cardTransactionType ' ] === 'continuous ' ) {
66+ $ gateway = Omnipay::create ('Eway_RapidDirect ' );
67+ $ gateway ->setApiKey ($ this ->getApiKey ());
68+ $ gateway ->setPassword ($ this ->getPassword ());
69+ $ gateway ->setTestMode ($ this ->getTestMode ());
70+ return $ gateway ->createRequest ('\Omnipay\Eway\Message\RapidDirectPurchaseRequest ' , $ parameters );
71+ }
6472 return $ this ->createRequest ('\Omnipay\Eway\Message\RapidSharedPurchaseRequest ' , $ parameters );
6573 }
6674
You can’t perform that action at this time.
0 commit comments