@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |
111 | 111 | curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); |
112 | 112 | curl_setopt($ch, CURLOPT_HTTPHEADER, ["X-Api-Key:{$api_key}", |
113 | - "X-Auth-Token:{$api_token}"]); |
|
113 | + "X-Auth-Token:{$api_token}"]); |
|
114 | 114 | return $ch; |
115 | 115 | } else { |
116 | 116 | throw new Exception('CURL extension is not loaded'); |
@@ -150,14 +150,14 @@ discard block |
||
150 | 150 | private static function createRefundInDB($user_id, \stdClass $refund, $payment_id) |
151 | 151 | { |
152 | 152 | $refund_record = MojoRefundDetails::create(['user_id' => $user_id, |
153 | - 'refund_id' => $refund->id, |
|
154 | - 'payment_id' => $payment_id, |
|
155 | - 'status' => $refund->status, |
|
156 | - 'type' => $refund->type, |
|
157 | - 'body' => $refund->body, |
|
158 | - 'refund_amount' => $refund->refund_amount, |
|
159 | - 'total_amount' => $refund->total_amount, |
|
160 | - ]); |
|
153 | + 'refund_id' => $refund->id, |
|
154 | + 'payment_id' => $payment_id, |
|
155 | + 'status' => $refund->status, |
|
156 | + 'type' => $refund->type, |
|
157 | + 'body' => $refund->body, |
|
158 | + 'refund_amount' => $refund->refund_amount, |
|
159 | + 'total_amount' => $refund->total_amount, |
|
160 | + ]); |
|
161 | 161 | |
162 | 162 | return $refund_record; |
163 | 163 | } |
@@ -39,19 +39,19 @@ |
||
39 | 39 | $user = User::where('email', $data['buyer'])->first(); |
40 | 40 | $user_id = $user->id; |
41 | 41 | MojoPaymentDetails::create(['user_id' => $user_id, |
42 | - 'buyer_email' => $data['buyer'], |
|
43 | - 'buyer_name' => $data['buyer_name'], |
|
44 | - 'buyer_phone' => $data['buyer_phone'], |
|
45 | - 'currency' => $data['currency'], |
|
46 | - 'amount' => $data['amount'], |
|
47 | - 'fees' => $data['fees'], |
|
48 | - 'longurl' => $data['longurl'], |
|
49 | - 'payment_id' => $data['payment_id'], |
|
50 | - 'payment_request_id' => $data['payment_request_id'], |
|
51 | - 'purpose' => $data['purpose'], |
|
52 | - 'shorturl' => $data['shorturl'], |
|
53 | - 'request_status' => 'completed', |
|
54 | - 'payment_status' => $data['status'], |
|
55 | - ]); |
|
42 | + 'buyer_email' => $data['buyer'], |
|
43 | + 'buyer_name' => $data['buyer_name'], |
|
44 | + 'buyer_phone' => $data['buyer_phone'], |
|
45 | + 'currency' => $data['currency'], |
|
46 | + 'amount' => $data['amount'], |
|
47 | + 'fees' => $data['fees'], |
|
48 | + 'longurl' => $data['longurl'], |
|
49 | + 'payment_id' => $data['payment_id'], |
|
50 | + 'payment_request_id' => $data['payment_request_id'], |
|
51 | + 'purpose' => $data['purpose'], |
|
52 | + 'shorturl' => $data['shorturl'], |
|
53 | + 'request_status' => 'completed', |
|
54 | + 'payment_status' => $data['status'], |
|
55 | + ]); |
|
56 | 56 | } |
57 | 57 | } |
@@ -9,5 +9,5 @@ |
||
9 | 9 | protected $table = 'mojo_payment_details'; |
10 | 10 | |
11 | 11 | protected $fillable = ['user_id','buyer_email','buyer_name','buyer_phone','currency','amount','fees','longurl','payment_id', |
12 | - 'payment_request_id','purpose','shorturl','request_status','payment_status',]; |
|
12 | + 'payment_request_id','purpose','shorturl','request_status','payment_status',]; |
|
13 | 13 | } |