Skip to content

Instantly share code, notes, and snippets.

@OlabodeAbesin
Created June 15, 2020 01:23
Show Gist options
  • Save OlabodeAbesin/17175d445df2efc4df0f57bad2f5ac8c to your computer and use it in GitHub Desktop.
Save OlabodeAbesin/17175d445df2efc4df0f57bad2f5ac8c to your computer and use it in GitHub Desktop.
public function quickFix(){
$array = [8910, 8906, 8905, 8904, 8903, 8902, 8901, 8900, 8899, 8898, 8897, 8896, 8895, 8894, 8893, 8892, 8887, 8886, 8885, 8884, 8883, 8882, 8879, 8877, 8868, 8867, 8866, 8865, 8864, 8863, 8862, 8861, 8860, 8859, 8857, 8856, 8855, 8854, 8852, 8850, 8849, 8847, 8845, 8844, 8843, 8842, 8841, 8840, 8839, 8838, 8837, 8836, 8831, 8830, 8829, 8828, 8827, 8826, 8825, 8824, 8823, 8822, 8821, 8820, 8819, 8818, 8817, 8816, 8815, 8814, 8813, 8812, 8811, 8810, 8809, 8808, 8807, 8806, 8805, 8804, 8803, 8802, 8801, 8800, 8799, 8797, 8796, 8795, 8794, 8793, 8792, 8791, 8790, 8789, 8786, 8785, 8784, 8783, 8782, 8781, 8780, 8779, 8778, 8777, 8775, 8774, 8773, 8772, 8771, 8770, 8769, 8768, 8766, 8765, 8764, 8763, 8762, 8761, 8759, 8758, 8757, 8756, 8755, 8754, 8752, 8751, 8750, 8749, 8748, 8747, 8746, 8745, 8744, 8743, 8742, 8741, 8739, 8738, 8737, 8736, 8735, 8734, 8733, 8732, 8731, 8730, 8729, 8728, 8725, 8724, 8723, 8722, 8721, 8720, 8714, 8713, 8712, 8711, 8710, 8709, 8707, 8706, 8705, 8704, 8703, 8702, 8701, 8700, 8699, 8698, 8697, 8696, 8693, 8692, 8691, 8690, 8689, 8688, 8686, 8685, 8684, 8683, 8682, 8681, 8675, 8674, 8673, 8668, 8667, 8665, 8664, 8663, 8662, 8654, 8652, 8651, 8650, 8649, 8647, 8646, 8645, 8644];
$failed = array();
foreach ($array as $key => $arrayvalue) {
try {
$transaction = Transaction::where('id', $arrayvalue)->first();
$response = Fineract::savings()->TMSundoTransaction($transaction->savingsId, $transaction->resourceId);
} catch (\Throwable $th) {
$failed[] = $arrayvalue;
}
}
return $failed;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment