add shipping rules
This commit is contained in:
@@ -3,14 +3,12 @@
|
||||
namespace App\Repositories\Shop;
|
||||
|
||||
use App;
|
||||
|
||||
use Devpark\PayboxGateway\Requests\AuthorizationWithCapture;
|
||||
use Devpark\PayboxGateway\Responses\Verify;
|
||||
use Devpark\PayboxGateway\Requests\Capture;
|
||||
use Devpark\PayboxGateway\Responses\Verify;
|
||||
|
||||
class Paybox
|
||||
{
|
||||
|
||||
public static function makeAuthorizationRequest($amount, $customer_email = 'test@example.com')
|
||||
{
|
||||
$authorizationRequest = App::make(AuthorizationWithCapture::class);
|
||||
@@ -26,11 +24,10 @@ class Paybox
|
||||
try {
|
||||
$success = $payboxVerify->isSuccess($invoice->total_shipped);
|
||||
if ($success) {
|
||||
// process order here after making sure it was real payment
|
||||
// process order here after making sure it was real payment
|
||||
}
|
||||
echo "OK";
|
||||
}
|
||||
catch (InvalidSignature $e) {
|
||||
echo 'OK';
|
||||
} catch (InvalidSignature $e) {
|
||||
Log::alert('Invalid payment signature detected');
|
||||
}
|
||||
}
|
||||
@@ -44,10 +41,9 @@ class Paybox
|
||||
->setPayboxTransactionNumber($payment->transaction_number)
|
||||
->setDayRequestNumber(2)
|
||||
->send();
|
||||
|
||||
|
||||
if ($response->isSuccess()) {
|
||||
// process order here
|
||||
// process order here
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user