diff --git a/LiteCharmsScheduler/LiteCharmsScheduler.csproj b/LiteCharmsScheduler/LiteCharmsScheduler.csproj index c54e25a..b3d4662 100644 --- a/LiteCharmsScheduler/LiteCharmsScheduler.csproj +++ b/LiteCharmsScheduler/LiteCharmsScheduler.csproj @@ -8,8 +8,8 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -18,7 +18,7 @@ - + diff --git a/LiteCharmsScheduler/Program.cs b/LiteCharmsScheduler/Program.cs index eb35640..28e656f 100644 --- a/LiteCharmsScheduler/Program.cs +++ b/LiteCharmsScheduler/Program.cs @@ -14,7 +14,9 @@ builder.Services.AddScoped(typeof(IPipelineBehavior<,>), typeof(LoggingPipelineB builder.Services.AddEmailServices(builder.Configuration); builder.Services.AddEmailServiceBus(); +builder.Services.AddHttpClient(); builder.Services.AddShopServices(); +builder.Services.AddPayfastServices(builder.Configuration); builder.Services.AddHashServices(builder.Configuration); builder.Services.AddMidrandShopDatabase(builder.Configuration); diff --git a/LiteCharmsScheduler/appsettings.json b/LiteCharmsScheduler/appsettings.json index c32928d..964ee0d 100644 --- a/LiteCharmsScheduler/appsettings.json +++ b/LiteCharmsScheduler/appsettings.json @@ -1,4 +1,16 @@ { + "PayfastSettings": { + "CheckoutUrl": "https://sandbox.payfast.co.za/eng/process", + "ValidHosts": [ + "www.payfast.co.za", + "sandbox.payfast.co.za", + "w1w.payfast.co.za", + "w2w.payfast.co.za", + "ips.payfast.co.za", + "api.payfast.co.za", + "payment.payfast.io" + ] + }, "HasherSettings": { "MinHashLength": 11 }, diff --git a/litecharms-scheduler-uat.yml b/litecharms-scheduler-uat.yml index ba4bacb..4224ec1 100644 --- a/litecharms-scheduler-uat.yml +++ b/litecharms-scheduler-uat.yml @@ -23,13 +23,14 @@ data: BookshopS3Settings__Region: "garage" BookshopS3Settings__BucketName: "bookshop" BookshopS3Settings__CdnBaseUrl: "https://bookshop.cdn.khongisa.co.za" - ValidPayfastHosts__0: "www.payfast.co.za" - ValidPayfastHosts__1: "sandbox.payfast.co.za" - ValidPayfastHosts__2: "w1w.payfast.co.za" - ValidPayfastHosts__3: "w2w.payfast.co.za" - ValidPayfastHosts__4: "ips.payfast.co.za" - ValidPayfastHosts__5: "api.payfast.co.za" - ValidPayfastHosts__6: "payment.payfast.io" + PayfastSettings__CheckoutUrl: "https://sandbox.payfast.co.za/eng/process" + PayfastSettings__ValidHosts__0: "www.payfast.co.za" + PayfastSettings__ValidHosts__1: "sandbox.payfast.co.za" + PayfastSettings__ValidHosts__2: "w1w.payfast.co.za" + PayfastSettings__ValidHosts__3: "w2w.payfast.co.za" + PayfastSettings__ValidHosts__4: "ips.payfast.co.za" + PayfastSettings__ValidHosts__5: "api.payfast.co.za" + PayfastSettings__ValidHosts__6: "payment.payfast.io" --- apiVersion: v1 kind: Secret @@ -44,9 +45,11 @@ data: aspire-apikey: bWMzRzYzSzJqNVpPRXNpMEFqTW9qTFRYbTFLRVpGY3R6SUlqU3dEaVRHdXQ4cUdTa1B1V3d4R1AxUmJzY0pVbw== email-password: JFpTLWVJQGlYbTVNUCRhfg== hasher-salt: VEdsbmFIUWdRMmhoY20xekxDQk5hV1J5WVc1a1FtOXZhM01nYldGclpTQnNiM1J6SUc5bUlHMXZibVY1SUdGdVpDQmhjbVVnWVNCemRXTmpaWE56Wm5Wc0lIWnBjbUZzSUhOMGIzSjVJR2x1SUZOdmRYUm9JRUZtY21sallRPT0= - hasher-payfastpassphrase: OUdBSVIwdFdwaFgwcU8= bookshop-s3-accesskey: R0s1MTRkMmNlOGRjNjkyMzdhMDVjMDFlZWY= bookshop-s3-secretkey: ZWFhZmVkYTFhZWQ0MDllY2ZlNjA3MTRlY2RhNTQ5YjgyYmRmNWEzZGFmOWYxOGRkNjFmNjZiNDk3M2E2NDgyZQ== + payfast-passphrase: OUdBSVIwdFdwaFgwcU8= + payfast-merchantid: MTAwNDkzMDc= + payfast-merchantkey: anU2bmF2bjBqY2JmMA== --- apiVersion: v1 kind: Service @@ -107,11 +110,21 @@ spec: secretKeyRef: name: scheduler-secrets key: hasher-salt - - name: HasherSettings__PayfastPassphrase + - name: PayfastSettings__Passphrase valueFrom: secretKeyRef: name: scheduler-secrets - key: hasher-payfastpassphrase + key: payfast-passphrase + - name: PayfastSettings__MerchantId + valueFrom: + secretKeyRef: + name: scheduler-secrets + key: payfast-merchantid + - name: PayfastSettings__MerchantKey + valueFrom: + secretKeyRef: + name: scheduler-secrets + key: payfast-merchantkey - name: ConnectionStrings__PostgresMidrandBooks valueFrom: secretKeyRef: