add shipping rules

This commit is contained in:
Ludovic CANDELLIER
2023-07-16 14:45:42 +02:00
parent 72a7b270f9
commit 0879b0abf0
459 changed files with 6219 additions and 5416 deletions

View File

@@ -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
}
}
}