Skip to content

Commit

Permalink
add Campaign URL to response
Browse files Browse the repository at this point in the history
Signed-off-by: Muharrem ERİN <[email protected]>
  • Loading branch information
mewebstudio committed Dec 19, 2018
1 parent 3142d1b commit 1ad6d18
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/garanti/3d-pay/form.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

$order_id = date('Ymd') . strtoupper(substr(uniqid(sha1(time())),0,4));

$amount = (double) 320;
$amount = (double) 1;
$instalment = '0';

$success_url = $base_url . 'response.php';
Expand Down
2 changes: 1 addition & 1 deletion examples/garanti/3d/form.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

$order_id = date('Ymd') . strtoupper(substr(uniqid(sha1(time())),0,4));

$amount = (double) 320;
$amount = (double) 1;
$instalment = '0';

$success_url = $base_url . 'response.php';
Expand Down
2 changes: 1 addition & 1 deletion examples/garanti/regular/status.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

// Query Order
$query= $pos->bank->status([
'order_id' => '2018111377EF',
'order_id' => '201812195CF2',
'currency' => 'TRY',
'ip' => $ip
]);
Expand Down
3 changes: 3 additions & 0 deletions src/EstPos.php
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ public function makeRegularPayment()
'status_detail' => $this->getStatusDetail(),
'error_code' => isset($this->data->Extra->ERRORCODE) ? $this->printData($this->data->Extra->ERRORCODE) : null,
'error_message' => isset($this->data->Extra->ERRORCODE) ? $this->printData($this->data->ErrMsg) : null,
'campaign_url' => null,
'extra' => isset($this->data->Extra) ? $this->data->Extra : null,
'all' => $this->data,
'original' => $this->data,
Expand Down Expand Up @@ -428,6 +429,7 @@ public function make3DPayment()
'xid' => (string) $this->request->get('xid'),
'md_error_message' => (string) $this->request->get('mdErrorMsg'),
'name' => (string) $this->request->get('firmaadi'),
'campaign_url' => null,
'email' => (string) $this->request->get('Email'),
'extra' => isset($this->data->Extra) ? $this->data->Extra : null,
'all' => $this->data,
Expand Down Expand Up @@ -495,6 +497,7 @@ public function make3DPayPayment()
'md_error_message' => (string) $this->request->get('mdErrorMsg'),
'name' => (string) $this->request->get('firmaadi'),
'email' => (string) $this->request->get('Email'),
'campaign_url' => null,
'extra' => $this->request->get('Extra'),
'all' => $this->request->request->all(),
];
Expand Down
3 changes: 3 additions & 0 deletions src/GarantiPos.php
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@ public function makeRegularPayment()
'status_detail' => $this->getStatusDetail(),
'error_code' => isset($this->data->Transaction->Response->Code) ? $this->printData($this->data->Transaction->Response->Code) : null,
'error_message' => isset($this->data->Transaction->Response->ErrorMsg) ? $this->printData($this->data->Transaction->Response->ErrorMsg) : null,
'campaign_url' => isset($this->data->Transaction->CampaignChooseLink) ? $this->printData($this->data->Transaction->CampaignChooseLink) : null,
'extra' => isset($this->data->Extra) ? $this->data->Extra : null,
'all' => $this->data,
'original' => $this->data,
Expand Down Expand Up @@ -566,6 +567,7 @@ public function make3DPayment()
'error_code' => isset($this->data->Transaction->Response->ErrorCode) ? $this->printData($this->data->Transaction->Response->ErrorCode) : null,
'error_message' => isset($this->data->Transaction->Response->ErrorMsg) ? $this->printData($this->data->Transaction->Response->ErrorMsg) : null,
'reason_code' => isset($this->data->Transaction->Response->ReasonCode) ? $this->printData($this->data->Transaction->Response->ReasonCode) : null,
'campaign_url' => isset($this->data->Transaction->CampaignChooseLink) ? $this->printData($this->data->Transaction->CampaignChooseLink) : null,
'md_status' => $this->request->get('mdstatus'),
'rand' => (string) $this->request->get('rnd'),
'hash' => (string) $this->request->get('secure3dhash'),
Expand Down Expand Up @@ -643,6 +645,7 @@ public function make3DPayPayment()
'error_code' => (string) $this->request->get('errcode'),
'error_message' => (string) $this->request->get('errmsg'),
'md_error_message' => (string) $this->request->get('mderrormessage'),
'campaign_url' => null,
'name' => (string) $this->request->get('firmaadi'),
'email' => (string) $this->request->get('Email'),
'extra' => $this->request->get('Extra'),
Expand Down
3 changes: 3 additions & 0 deletions src/PosNet.php
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@ public function makeRegularPayment()
'status_detail' => $this->getStatusDetail(),
'error_code' => $error_code,
'error_message' => $error_message,
'campaign_url' => null,
'extra' => null,
'all' => $this->data,
'original' => $this->data,
Expand Down Expand Up @@ -546,6 +547,7 @@ public function make3DPayment()
],
'xid' => isset($this->data->oosResolveMerchantDataResponse->xid) ? $this->data->oosResolveMerchantDataResponse->xid : null,
'md_error_message' => isset($this->data->oosResolveMerchantDataResponse->mdErrorMessage) ? $this->data->oosResolveMerchantDataResponse->mdErrorMessage : null,
'campaign_url' => null,
'all' => $this->data,
];

Expand Down Expand Up @@ -609,6 +611,7 @@ public function make3DPayPayment()
'md_error_message' => (string) $this->request->get('mdErrorMsg'),
'name' => (string) $this->request->get('firmaadi'),
'email' => (string) $this->request->get('Email'),
'campaign_url' => null,
'extra' => $this->request->get('Extra'),
'all' => $this->request->request->all(),
];
Expand Down

0 comments on commit 1ad6d18

Please sign in to comment.