payment check
This commit is contained in:
parent
29bf7304d0
commit
99ff7f3375
|
|
@ -633,7 +633,7 @@ class EventCheckoutController extends Controller
|
||||||
$transaction_data = session()->get('ticket_order_' . $event_id . '.transaction_data');
|
$transaction_data = session()->get('ticket_order_' . $event_id . '.transaction_data');
|
||||||
// dd($transaction_data);
|
// dd($transaction_data);
|
||||||
$response = $this->gateway->getPaymentStatus($transaction_data[0]['orderId']);
|
$response = $this->gateway->getPaymentStatus($transaction_data[0]['orderId']);
|
||||||
|
dd($response->getResponseData());
|
||||||
if ($response->isSuccessfull()) {
|
if ($response->isSuccessfull()) {
|
||||||
session()->push('ticket_order_' . $event_id . '.transaction_id', $response->getPaymentReferenceId());
|
session()->push('ticket_order_' . $event_id . '.transaction_id', $response->getPaymentReferenceId());
|
||||||
return $this->completeOrder($event_id, false);
|
return $this->completeOrder($event_id, false);
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ abstract class PaymentResponse
|
||||||
|
|
||||||
public function setResponseData($data){
|
public function setResponseData($data){
|
||||||
$this->response_data = json_decode($data, true);
|
$this->response_data = json_decode($data, true);
|
||||||
dd($this->response_data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setExceptionMessage($message){
|
public function setExceptionMessage($message){
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,8 @@ class PaymentStatusResponse extends PaymentResponse
|
||||||
|
|
||||||
public function isSuccessfull()
|
public function isSuccessfull()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
if(!$this->exception_message)
|
if(!$this->exception_message)
|
||||||
return $this->response_data['ErrorCode'] == 0
|
return $this->response_data['ErrorCode'] == 0
|
||||||
&& $this->response_data['OrderStatus'] == 2;
|
&& $this->response_data['OrderStatus'] == 2;
|
||||||
|
|
@ -25,4 +27,8 @@ class PaymentStatusResponse extends PaymentResponse
|
||||||
{
|
{
|
||||||
return $this->response_data['OrderNumber'];
|
return $this->response_data['OrderNumber'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getResponseData(){
|
||||||
|
return $this->response_data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue