Giter VIP home page Giter VIP logo

migs-payment-gateway-mvc5's Introduction

MIGS payment gateway for Asp.Net MVC5

An example of Mastercards MIGS payment gateway using Asp.Net MVC5.

Screenshots: https://github.com/mwd-au/MIGS-payment-gateway-MVC5/wiki/Screenshots

MIGS Dev kit available from your bank or here (Virtual Payment Client - Developers Kit): http://www.anz.com/australia/business/merchant/DownloadDevKit.asp

Important Files:

Controllers\PaymentController.cs

Helpers\PaymentHelper.cs

Views\Payment\Index.cshtml

Views\Shared\_Layout.cshtml

Web.config

Get Started:

Look for the following code in the web.config file and replace the values with the information given to you by your bank or log into your MIGS portal and find them there.

<!-- MIGS SETTINGS -->
<add key="MigsMerchantID" value="" />
<add key="MigsAccessCode" value="" />
<add key="MigsSecureHashSecret" value="" />

Important Notes

  1. You must publish this project to a live domain so that Mastercard can return a result to your website after they have attempted to process your payment.
  2. All payment amounts are in cents (eg: $5.00 = 500 cents).

Test Mode

To use MIGS test mode, log into your banks MIGS portal using the word TEST in-front of your Merchant ID. Update your web.config file to use the values found in the test portal.

Live merchant id example: BBL1234567

Test merchant id example: TESTBBL1234567

Test Card Numbers

You can do transactions against MIGS in test mode using the following test card numbers.

Mastercard

card number = 5123456789012346

expiry date = 0517 (MMYY)

csc/cvv = 100

Visa

card number = 4987654321098769

expiry date = 0517 (MMYY)

csc/cvv = 100

To return the appropriately mapped response you must append each purchase amount with a cents amount that correlates as below. The dollar amount is not relevant.

.00 - Approved (Response Code 0)

.51- Insufficient Funds (Response Code 5)

.57 - Invalid Transaction (Response Code 8)

.54 - Expired Card (Response Code 4)

.91 - Error communicating with Bank (Response Code 6)

So to test an approved Mastercard you would enter details as below:

card number = 5123456789012346

expiry date = 0517 (MMYY)

purchase amount = $1.00

And to test an insufficient funds Mastercard response you would enter details as below:

card number = 5123456789012346

expiry date = 0517 (MMYY)

purchase amount = $1.51

Credits:

Based on the payment controller from https://gist.github.com/samnaseri/2211309

migs-payment-gateway-mvc5's People

Contributors

justcallmead avatar

Watchers

James Cloos avatar Clemente Giorio avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.