Hi Everyone,

I hope someone can shed some light on my confusion and newby skills as far as custom Payment Plugin developemnt is concerned.

Ok so I have a Client in South Africa, who wants to use the PayNow service for SagePay (South Africa). We had a look at existing solutions for SagePay, but they only work for UK and US markets. The website runs off nopCommerce 3.90.

So I have to develop a custom Payment Plugin from scratch to work with SagePay South Africa. I have to confess, this is the first time I attempt to code something like this. My background with Visual Studio is stronger on the VB side, but I do know my way around C# and can understand the source code for nopCommerce.

So I started off by using PayPal.Standadrd to model my custom plugin, but I'm afraid I'm in the deep end of the water here.

Here is what I got from SagePay South Africa, in terms of connecting to them:

1) They use a single encrypted Service Key to identify the Merchant for which the payment must be processed. So the only essential configuration setting/input for the plugin will be the Service Key. So based on the Paypal.Standard code, I have the following under the Models/ConfigurationModel.cs


2) In SagePay South Africa's API documenttation the following must be sent via HTTP POST, and I'm using their simple HTML Form Post example found at the URL below to illustrate (I know I can't use this code for Nop):

https://sagepay.co.za/integration/sage-pay-integration-documents/pay-now-gateway-technical-guide/

--------------------->

<form name="form" id="form" method="POST" action="https://paynow.sagepay.co.za/site/paynow.aspx" target=”_blank”> <!---this is where you will POST too in a NEW WINDOW--->
  <input type="text" name="m1" value="62exxx50-7a9e-22as-b162-610xxx151068"> <!---Pay Now Service Key--->
  <input type="text" name="m2" value="24ade73c-98cf-47b3-99be-cc7b867b3080"> <!---Software Vendor Key--->
  <input type="text" name="p2" value="ID:123"> <!---Unique ID for this / each transaction--->
  <input type="text" name="p3"  value="Test / Demo goods"> <!---Description of goods being purchased--->
  <input type="text" name="p4" value="5.00"> <!---Amount to be settled / paid--->
  <input type="text" name="Budget" value="N"> <!---Budget facility being offered?--->
  <input type="text" name="m4" value="Extra 1"> <!---This is an extra field, you can place any data in here which will be returned--->
  <input type="text" name="m5" value="Extra 2"> <!---This is an extra field, you can place any data in here which will be returned --->
  <input type="text" name="m6" value="Extra 3"> <!---This is an extra field, you can place any data in here which will be returned --->
  <input type="text" name="m9" value="[email protected]"> <!---Card holders email address--->
  <input type="text" name="m11" value="0807777777"> <!---Card holders mobile number--->
  <input type="text" name="m10" value="Demo attempt for testing"> <!---Data set used by shopping carts such as OSCommerce and Virtuemart--->
  <input name="submit" type="submit" value="PROCESS PAYMENT"> <!---Submit button--->
</form>

--------------------->


3) They only have a single URL for both the test environment (sandbox) and live. When testing you activate the test environment in the client control panel at SagePay's website.


4) The only other requirement is individual provision for an Accept URL, Decline URL, Notify URL, Re-direct URL. These must be separate to handle post-back messages.



I'm going to be honest, I thought I could figure this out, but a week later I realize I need help. I do wish to go through the process of learning how to code this myself, but I need guidance. I have had gracious offers from community members wanted to code this for me at a price, but this will not teach me anything.


So I need help coding the following, based on the API guidelines above (Can I use PayPal.Standard for this as guideline? So far I'm really confused how it all works together):

1) Controllers:   PaymentSagePayController.cs

2) Models:   ConfigurationModel.cs

3) Views:   Configure.cs and PaymentInfo.cs

4) RouteProivider.cs,

5) SagePayHelper.cs

6) SagePayPaymentProcessor.cs

7) SagePayPaymentSettings.cs


I know I'm asking a lot, but any help or guidance or examples I can use to do this will be much appreciated.