File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -160,6 +160,30 @@ public function setInvoiceNumber($value)
160160 return $ this ->setParameter ('invoiceNumber ' , $ value );
161161 }
162162
163+ public function getOpaqueDataDescriptor ()
164+ {
165+ return $ this ->getParameter ('opaqueDataDescriptor ' )
166+ ? $ this ->getParameter ('opaqueDataDescriptor ' )
167+ : $ this ->httpRequest ->request ->get ('opaqueDataDescriptor ' );
168+ }
169+
170+ public function getOpaqueDataValue ()
171+ {
172+ return $ this ->getParameter ('opaqueDataValue ' )
173+ ? $ this ->getParameter ('opaqueDataValue ' )
174+ : $ this ->httpRequest ->request ->get ('opaqueDataValue ' );
175+ }
176+
177+ public function setOpaqueDataDescriptor ($ value )
178+ {
179+ return $ this ->setParameter ('opaqueDataDescriptor ' , $ value );
180+ }
181+
182+ public function setOpaqueDataValue ($ value )
183+ {
184+ return $ this ->setParameter ('opaqueDataValue ' , $ value );
185+ }
186+
163187 public function sendData ($ data )
164188 {
165189 $ headers = array ('Content-Type ' => 'text/xml; charset=utf-8 ' );
Original file line number Diff line number Diff line change @@ -26,6 +26,12 @@ public function getData()
2626
2727 protected function addPayment (\SimpleXMLElement $ data )
2828 {
29+ if ($ this ->getOpaqueDataDescriptor () && $ this ->getOpaqueDataValue ()) {
30+ $ data ->transactionRequest ->payment ->opaqueData ->dataDescriptor = $ this ->getOpaqueDataDescriptor ();
31+ $ data ->transactionRequest ->payment ->opaqueData ->dataValue = $ this ->getOpaqueDataValue ();
32+ return ;
33+ }
34+
2935 $ this ->validate ('card ' );
3036 /** @var CreditCard $card */
3137 $ card = $ this ->getCard ();
You can’t perform that action at this time.
0 commit comments