@@ -62,7 +62,7 @@ function checkInvoiceStatus($url)
62
62
63
63
$ orderid = checkCbInvoiceID ($ invoiceStatus ->data ->orderId , 'bitpaycheckout ' );
64
64
$ price = $ invoiceStatus ->data ->price ;
65
- //first see if the ipn matches
65
+ // First see if the ipn matches
66
66
$ trans_data = Capsule::table ('_bitpay_checkout_transactions ' )
67
67
->select ('order_id ' , 'transaction_id ' , 'transaction_status ' )
68
68
->where ([
@@ -76,13 +76,13 @@ function checkInvoiceStatus($url)
76
76
77
77
if ($ btn_id ) {
78
78
switch ($ data ['status ' ]) {
79
- //complete , update invoice table to Paid
79
+ // Complete , update invoice table to Paid
80
80
case 'complete ' :
81
81
if ($ transaction_status == $ data ['status ' ]) {
82
82
exit ();
83
83
}
84
84
85
- //update the bitpay_invoice table
85
+ // Update the bitpay_invoice table
86
86
$ table = '_bitpay_checkout_transactions ' ;
87
87
$ update = array ('transaction_status ' => 'complete ' , 'updated_at ' => date ('Y-m-d H:i:s ' ));
88
88
try {
@@ -105,9 +105,9 @@ function checkInvoiceStatus($url)
105
105
);
106
106
break ;
107
107
108
- //processing - put in Payment Pending
108
+ // Processing - put in Payment Pending
109
109
case 'paid ' :
110
- //update the invoices table
110
+ // Update the invoices table
111
111
$ table = 'tblinvoices ' ;
112
112
$ update = array ("status " => 'Payment Pending ' ,'datepaid ' => date ('Y-m-d H:i:s ' ));
113
113
try {
@@ -121,7 +121,7 @@ function checkInvoiceStatus($url)
121
121
file_put_contents ($ file , $ e , FILE_APPEND );
122
122
}
123
123
124
- //update the bitpay_invoice table
124
+ // Update the bitpay_invoice table
125
125
$ table = '_bitpay_checkout_transactions ' ;
126
126
$ update = array ('transaction_status ' => 'paid ' , 'updated_at ' => date ('Y-m-d H:i:s ' ));
127
127
try {
@@ -136,9 +136,9 @@ function checkInvoiceStatus($url)
136
136
}
137
137
break ;
138
138
139
- //expired , remove from transaction table, wont be in invoice table
139
+ // Expired , remove from transaction table, wont be in invoice table
140
140
case 'expired ' :
141
- //delete any orphans
141
+ // Delete any orphans
142
142
$ table = '_bitpay_checkout_transactions ' ;
143
143
try {
144
144
Capsule::table ($ table )
@@ -149,7 +149,7 @@ function checkInvoiceStatus($url)
149
149
}
150
150
break ;
151
151
152
- //refunded , set invoice and bitpay transaction to refunded status
152
+ // Refunded , set invoice and bitpay transaction to refunded status
153
153
case 'pending ' :
154
154
if ($ event ['name ' ] == 'refund_pending ' ) {
155
155
//update the invoices table
@@ -166,7 +166,7 @@ function checkInvoiceStatus($url)
166
166
file_put_contents ($ file , $ e , FILE_APPEND );
167
167
}
168
168
169
- //update the bitpay invoice table
169
+ // Update the bitpay invoice table
170
170
$ table = '_bitpay_checkout_transactions ' ;
171
171
$ update = array ('transaction_status ' => 'refunded ' , 'updated_at ' => date ('Y-m-d H:i:s ' ));
172
172
try {
0 commit comments