Code Monkey home page Code Monkey logo

wmvn-merchant-csharp's Introduction

wmvn-merchant-csharp

Webmoney Vietnam Merchant C# Sample Code

Đây là thư viện sample code để tích hợp giao tiếp với cổng thanh toán Webmoney Merchant API, dành cho các đối tác của Webmoney Vietnam

Yêu cầu

  • .NET Framework 4.5.2

Hướng dẫn sử dụng

Build project WM.Merchant. Add reference vào project web của bạn Thư viện sẽ yêu cầu một số thông tin chứng thực API, bao gồm MerchantCode, Passcode và Secret Key, được cung cấp bởi Webmoney

Thêm và chỉnh sửa một số thông tin trong Web.config

<configuration>
  	<configSections>
    	...
    	<section name="wmMerchant" type="WM.Merchant.MerchantConfiguration" />
  	</configSections>
	...
	<wmMerchant>
    	<wmService merchantCode="YOUR MERCHANT CODE" passcode="YOUR PASSCODE" secretKey="YOUR SECRET KEY" productionMode="false" />
  	</wmMerchant>
<configuration>

Class WMService gồm có một số phương thức chính:

public WMResponseHandler<CreateOrderResponse> CreateOrder(CreateOrderRequest model);

Gửi HTTP POST đến Webmoney Merchant để tạo đơn hàng. Thông tin trả về bao gồm Transaction ID của giao dịch trên Webmoney và RedirectURL để chuyển đến cổng thanh toán

public WMResponseHandler<ViewOrderResponse> ViewOrder(ViewOrderRequest model);

Gửi HTTP POST đến Webmoney Merchant để xem thông tin giao dịch.

public string ValidateSuccessURL();
public string ValidateFailedURL();
public string ValidateCanceledURL();

Sau khi thanh toán thành công, hoặc giao dịch bị hủy. Cổng thành toán sẽ trả về URL của đối tác, bao gồm transaction ID của đơn hàng và checksum. Lúc đó cần sử dụng những phương thức này để kiểm tra

wmvn-merchant-csharp's People

Contributors

hgiasac avatar

Watchers

James Cloos avatar  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.