Permalink
Browse files

Added constants

  • Loading branch information...
sudiptpa committed May 20, 2018
1 parent 75a9585 commit c469e59a9bf3ccc7d98bc301d52d5d5e8487901b
Showing with 6 additions and 1 deletion.
  1. +4 −1 app/Http/Controllers/PayPalController.php
  2. +2 −0 app/Order.php
@@ -72,7 +72,10 @@ public function completed($order_id, Request $request)
]);
if ($response->isSuccessful()) {
$order->update(['transaction_id' => $response->getTransactionReference()]);
$order->update([
'transaction_id' => $response->getTransactionReference(),
'payment_status' => Order::PAYMENT_COMPLETED,
]);
return redirect()->route('order.paypal', encrypt($order_id))->with([
'message' => 'You recent payment is sucessful with reference code ' . $response->getTransactionReference(),
@@ -6,6 +6,8 @@
class Order extends Model
{
const PAYMENT_COMPLETED = 1;
const PAYMENT_PENDING = 0;
/**
* @var string
*/

0 comments on commit c469e59

Please sign in to comment.