New Ecommerce code
The new code it is ALL commented (you have almost one comment for instruction… you should not get lost)
Preface:
You have setting in web.config.
<BankGateways>
<!-- key must match the Name property of the gateway. value="FullClass with namespace,Assembly" -->
<add key="CreditTransfer" value="Rainbow.ECommerce.GatewayCreditTransfer,Rainbow.dll" />
</BankGateways>
Gateway can be in any valid dll…
The GatewayManager loads a list of all Gateways and can instantiate any using only the name.
You may get a reference to CreditTransfer calling Rainbow.ECommerce.GatewayManager.GetGateway("CreditTransfer");
Tutorial
You need to provide a line in rb_EcommerceMerchants
Merchant id can be any for CreditTansfer. It is alphanumeric.
Put 001 for try.
Leave Gateway name for now.
Provide a valid email for BOTH merchant and technical (can be the same).
In metadata XML provide any custom data you want.
Sample:
All keys you place here will be show on checkout to your customer.
For your convenience the update scripts add a sample row to Ecommerce merchants.
You may change as you like but note that:
-
Metadata must be a vaild XML file
-
There is no input facility for edit this table right now (Use Enterprise Manager, Ms Access or Tableedit module)
Now go on product module properties.
On CreditTransfer setting put the merchant number you put before. 001.

Now on checkout page you will see CreditTransfer. (you see only the gateways the have a merchant id in setting)

If you will see the submit button (form out of server side)

When you press submit you complete the order.
You do not need further steps for Credit Transfer.

Coding a new provider may be much more complicate
Your Page could be a little more complicate.
This new way should support very well any gateway type….
Feel free to ask me any question you may have on this new implementation.
Shipping
Shipping works in the very same way. Same table.
I have provided 2 demo shipping.
<
ShippingObjects>
<!-- key must match the Name property of the Sihipping Object. value="FullClass with namespace,Assembly" -->
<add key="FixedShipping" value="Rainbow.ECommerce.ShippingFixed,Rainbow.dll" />
<add key="ElectronicDelivery" value="Rainbow.ECommerce.ShippingElectronicDelivery,Rainbow.dll" />
</ShippingObjects>
FixedShipping (code 100)
The first one admits 3 properties:
Percentage: Shipping will be a percentage of the total cart.
MaxValue: Constrain ensure shipping costs no more than this amount. Must be a vaild currency value like "$ 10". Optional. If present must be greater than MinValue.
MinValue: Constrain ensure shipping costs no less than this amount. Must be a vaild currency value like "$ 10". Optional. Default is 0. If present must be less than MaxValue.
Total cannot be 0.
ElectronicDelivery (code 200)
It return always 0. Used for Electroic delivery where there is no shipping cost.
New Layout
I have tried to make all Ecommerce support in Rainbow a bit more clear to me.
Too many files are in too many folder to track it out.
So I thought about move all files in a single Ecommerce directory. Secure files are in Secure dir.
Here is the new layout:
New folder ECommerce
All Secure/Components moved to ECommerce
OrderIO changed in OrderManager
GatewayAuthorize temporary excluded (it does not compile now)
All Secure files are in /Secure
Products module moved to ECommerce/DesktopModules
Added Install.xml and Install.sql (destructive for now – do not run!!!) please check to see if I missed some important table or procedure
Run Update.sql (this will be included in rb update script), it corrects Products.ascx path and creates a new table for vendors.
GatewayWireTransfer renamed in GatewayCreditTransfer
Rainbow Secure page moved from UI to ECommerce/UI
Design/ProductLayouts moved in ECommerce/Design/ProductLayouts
Design/ProductItem.cs moved in ECommerce/Design/ProductItem.cs
OrderReceipt.xslt is now renamed HTMLReceipt.xslt and modved to ECommerce/Design/OrderTemplates dir and optionally accessed as embedded resource. No need to load file.
We may provide alternate xslt in future (e.g. for support plain text)
Todo
Main TODO are:
1) Shipping (waiting for reply from DotNetShipping project)
2) New providers (Authorize, Pay pal) – I have left Authorize provider but you should remove from solution. It does not compile right now