Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1039f6f2d5 | |||
| 765eee2060 | |||
| ee250a18f0 | |||
| 5972f8906b | |||
| b90c6381a0 | |||
| c65398bdf6 |
@@ -25,10 +25,6 @@ public sealed class PayfastConfirmationEndpoint : IEndpoint
|
|||||||
|
|
||||||
string? remoteIp = request.HttpContext.Connection.RemoteIpAddress?.ToString();
|
string? remoteIp = request.HttpContext.Connection.RemoteIpAddress?.ToString();
|
||||||
|
|
||||||
var ipValidation = await payfastService.ValidateReferrerIpAsync(remoteIp!, !hostEnvironment.IsProduction(), cancellationToken);
|
|
||||||
|
|
||||||
if (ipValidation.IsFailed || !ipValidation.Value) return Results.Unauthorized();
|
|
||||||
|
|
||||||
var formCollection = await request.ReadFormAsync(cancellationToken);
|
var formCollection = await request.ReadFormAsync(cancellationToken);
|
||||||
|
|
||||||
if (!formCollection.TryGetValue("signature", out var signatureValues) || string.IsNullOrWhiteSpace(signatureValues.ToString()))
|
if (!formCollection.TryGetValue("signature", out var signatureValues) || string.IsNullOrWhiteSpace(signatureValues.ToString()))
|
||||||
|
|||||||
@@ -22,11 +22,9 @@ data:
|
|||||||
PayfastSettings__CheckoutUrl: "https://sandbox.payfast.co.za/eng/process"
|
PayfastSettings__CheckoutUrl: "https://sandbox.payfast.co.za/eng/process"
|
||||||
PayfastSettings__ValidHosts__0: "www.payfast.co.za"
|
PayfastSettings__ValidHosts__0: "www.payfast.co.za"
|
||||||
PayfastSettings__ValidHosts__1: "sandbox.payfast.co.za"
|
PayfastSettings__ValidHosts__1: "sandbox.payfast.co.za"
|
||||||
PayfastSettings__ValidHosts__2: "w1w.payfast.co.za"
|
PayfastSettings__ValidHosts__2: "ips.payfast.co.za"
|
||||||
PayfastSettings__ValidHosts__3: "w2w.payfast.co.za"
|
PayfastSettings__ValidHosts__3: "api.payfast.co.za"
|
||||||
PayfastSettings__ValidHosts__4: "ips.payfast.co.za"
|
PayfastSettings__ValidHosts__4: "payment.payfast.io"
|
||||||
PayfastSettings__ValidHosts__5: "api.payfast.co.za"
|
|
||||||
PayfastSettings__ValidHosts__6: "payment.payfast.io"
|
|
||||||
LiteCharmsSettings__Authority: "https://sts.security.khongisa.co.za"
|
LiteCharmsSettings__Authority: "https://sts.security.khongisa.co.za"
|
||||||
LiteCharmsSettings__Audience: "midrandbooks-api"
|
LiteCharmsSettings__Audience: "midrandbooks-api"
|
||||||
---
|
---
|
||||||
@@ -128,17 +126,17 @@ spec:
|
|||||||
- name: PayfastSettings__Passphrase
|
- name: PayfastSettings__Passphrase
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: scheduler-secrets
|
name: midrandbooksapi-secrets
|
||||||
key: payfast-passphrase
|
key: payfast-passphrase
|
||||||
- name: PayfastSettings__MerchantId
|
- name: PayfastSettings__MerchantId
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: scheduler-secrets
|
name: midrandbooksapi-secrets
|
||||||
key: payfast-merchantid
|
key: payfast-merchantid
|
||||||
- name: PayfastSettings__MerchantKey
|
- name: PayfastSettings__MerchantKey
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: scheduler-secrets
|
name: midrandbooksapi-secrets
|
||||||
key: payfast-merchantkey
|
key: payfast-merchantkey
|
||||||
- name: ConnectionStrings__PostgresScheduler
|
- name: ConnectionStrings__PostgresScheduler
|
||||||
valueFrom:
|
valueFrom:
|
||||||
|
|||||||
Reference in New Issue
Block a user