Skip to content

Commit d79f500

Browse files
author
rkesarwa
committed
Add sender_id to support meta key support
1 parent 730219c commit d79f500

2 files changed

Lines changed: 18 additions & 3 deletions

File tree

lib/CybsClient.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class CybsClient extends SoapClient
1414

1515
private $merchantId;
1616
private $transactionKey;
17+
private $senderId;
1718

1819
function __construct($options=array(), $properties, $nvp=false)
1920
{
@@ -40,11 +41,16 @@ function __construct($options=array(), $properties, $nvp=false)
4041
parent::__construct($wsdl, $options);
4142
$this->merchantId = $properties['merchant_id'];
4243
$this->transactionKey = $properties['transaction_key'];
44+
$this->senderId = $properties['sender_id'];
45+
46+
if(!$this->senderId) {
47+
$this->senderId = $this->merchantId;
48+
}
4349

4450
$nameSpace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
4551

4652
$soapUsername = new SoapVar(
47-
$this->merchantId,
53+
$this->senderId,
4854
XSD_STRING,
4955
NULL,
5056
$nameSpace,
@@ -113,4 +119,12 @@ public function getTransactionKey()
113119
{
114120
return $this->transactionKey;
115121
}
122+
123+
/**
124+
* @return string The client's sender ID.
125+
*/
126+
public function getSenderId()
127+
{
128+
return $this->senderId;
129+
}
116130
}

lib/conf/cybs.ini

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
merchant_id = your_merchant_id
2-
transaction_key = "your_transaction_key"
1+
merchant_id = rkesarwa
2+
#sender_id = <portfolio-mid>
3+
transaction_key = "XmMOqP4SqI8GVaxtoKqQ1uEpNGTL5w6tU+Rz1GufHHbozZf5LbcBTQL0kMKwgAkhtWCttYdSk5UkG0BjHH3NsExdJR5Wjyauz8z6LfjP3ntYXejkhW6CTdB83OB/8qKyxdCKCHaYxfKsDSlvRoONuTg8Cgg11o2qebQrS+mapJODwwjlxesuDbqu7sKS0Ls2AwNkHdiH0N7T4ZOJnZ0z6lls7vuDQUfwOJoJWnhHQ/C1jTErw8jZRvh87tCGXD68m+u+satqdPlLSR1tZ4j0YldGsaRZ7ZNv4SjitiUqDs34xfBtL9TZqrH/VyT3OuBAjUI79JGDXTXgC1U4oinSFQ=="
34

45
; Modify the URL to point to either a live or test WSDL file with the desired API version.
56
wsdl = "https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor/CyberSourceTransaction_1.120.wsdl"

0 commit comments

Comments
 (0)