mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
PayFast Webhook URL listener
This commit is contained in:
parent
94c424a15b
commit
3baa0e3d9a
@ -11,6 +11,7 @@
|
||||
|
||||
namespace App\PaymentDrivers;
|
||||
|
||||
use App\Http\Requests\Payments\PaymentWebhookRequest;
|
||||
use App\Models\ClientGatewayToken;
|
||||
use App\Models\GatewayType;
|
||||
use App\Models\Payment;
|
||||
@ -91,4 +92,8 @@ class DriverTemplate extends BaseDriver
|
||||
{
|
||||
return $this->payment_method->yourTokenBillingImplmentation(); //this is your custom implementation from here
|
||||
}
|
||||
|
||||
public function processWebhookRequest(PaymentWebhookRequest $request, Payment $payment = null)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -128,5 +128,12 @@ class PayFastPaymentDriver extends BaseDriver
|
||||
$getString .= '&passphrase='. urlencode( trim( $passPhrase ) );
|
||||
}
|
||||
return md5( $getString );
|
||||
}
|
||||
|
||||
public function processWebhookRequest(PaymentWebhookRequest $request, Payment $payment = null)
|
||||
{
|
||||
|
||||
nlog($request->all());
|
||||
return response()->json([], 200);
|
||||
}
|
||||
}
|
||||
|
@ -17,6 +17,7 @@
|
||||
<input type="hidden" name="subscription_type" value="{{ $subscription_type }}">
|
||||
<input type="hidden" name="passphrase" value="{{ $passphrase }}">
|
||||
<input type="hidden" name="signature" value="{{ $signature }}">
|
||||
|
||||
|
||||
@if(!Request::isSecure())
|
||||
<p class="alert alert-failure">{{ ctrans('texts.https_required') }}</p>
|
||||
@ -28,9 +29,15 @@
|
||||
{{ ctrans('texts.credit_card') }}
|
||||
@endcomponent
|
||||
|
||||
@component('portal.ninja2020.gateways.includes.pay_now', ['id' => 'server_response'])
|
||||
{{ ctrans('texts.add_payment_method') }}
|
||||
@endcomponent
|
||||
<div class="bg-white px-4 py-5 flex justify-end">
|
||||
<button
|
||||
type="submit"
|
||||
id="{{ $id ?? 'pay-now' }}"
|
||||
class="button button-primary bg-primary {{ $class ?? '' }}">
|
||||
<span>{{ ctrans('texts.add_payment_method') }}</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
@endsection
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user