GithubHelp home page GithubHelp logo

zukiin / paygate-payhost Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wiredmartian/paygate-payhost

0.0 0.0 0.0 38 KB

Using Paygate Payhost with .NET Core 3.1 Web API

Home Page: https://www.youtube.com/watch?v=5P8FL4Al4N8

License: MIT License

JavaScript 2.16% C# 53.58% TypeScript 34.88% HTML 9.16% SCSS 0.21%

paygate-payhost's Introduction

Paygate PayHost

This is a simple implementation of online payments using Paygate's PayHost.

Docs can be found on the official website (https://docs.paygate.co.za/#payhost)

Get Started

To get started, you need to have Angular 12+ installed.

You also need .NET Core 3.1 installed.

Running the app

Change the redirect urls in /Templates/SinglePaymentRequest.xml to live (not localhost) urls.

The NotifyUrl has to be a POST endpoint, where Paygate will post the results of a payment.

<Redirect>
    <NotifyUrl>https://sockets.diggipiggy.xyz/payment/complete</NotifyUrl>
    <ReturnUrl>https://sockets.diggipiggy.xyz/payment/complete</ReturnUrl>
</Redirect>

In this case, I used a sockets so that the UI will be able to catch the response from that endpoint.

You can clone this socket service (https://github.com/wiredmartian/socket-service), and deploy it.

Use the url of where it sits as yoyr ReturnUrl and NotifyUrl like above.


And finally, to run the API (root of this project):

$ dotnet run - the API runs on port :5000 and securely on :5001

To run the client:

$ cd payhost-client - move into the client directory

$ npm i - install dependencies

$ ng serve - to run app (runs on port :4200)

Testing

Head over to (https://docs.paygate.co.za/#testing-2) for testing Bank Cards.

Approved Transactions

RESULT_CODE = 990017; TRANSACTION_STATUS = 1

Card Brand Card Number Risk Indicator
Visa 4000000000000002 Authenticated (AX) *
MasterCard 5200000000000015 Authenticated (AX) *

Insufficient Funds Transactions

RESULT_CODE = 900003; TRANSACTION_STATUS = 2

Card Brand Card Number Risk Indicator
Visa 4000000000000028 Not Authenticated (NX)
MasterCard 5200000000000023 Not Authenticated (NX) *

Declined Transactions

RESULT_CODE = 900007; TRANSACTION_STATUS = 2

Card Brand Card Number Risk Indicator
Visa 4000000000000036 Authenticated (AX) *
MasterCard 5200000000000049 Authenticated (AX) *

Tutorial Video

https://www.youtube.com/watch?v=5P8FL4Al4N8

paygate-payhost's People

Contributors

wiredmartian 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.