佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

查看: 3287|回复: 12

小弟正想要用asp.net做网站。有谁知道如何把ipay88 和paypal plug in 请进来?

[复制链接]
发表于 21-11-2012 09:35 AM | 显示全部楼层 |阅读模式
如题。小弟不知如何用asp .net, vb.net 的 coding写,用ipay88 和 paypal过账.有谁有做过吗?能够分享这部分的coding吗?
谢谢了。
本帖最后由 ltk1984 于 21-11-2012 10:17 AM 编辑

回复

使用道具 举报


ADVERTISEMENT

 楼主| 发表于 21-11-2012 09:49 AM | 显示全部楼层

RE: 小弟正想要用asp.net做网站。有谁知道如何把ipay88 和paypal plug in 请进来帮忙

如题,谁有sample code,做网上买卖,ipay88和paypal过账的部分?谢谢。
回复

使用道具 举报

发表于 21-11-2012 10:29 AM | 显示全部楼层
Google 了一下, 可能以下资料对您有用:

http://www.west-wind.com/present ... yPalIntegration.asp
回复

使用道具 举报

 楼主| 发表于 21-11-2012 11:07 AM | 显示全部楼层
wwc_cheng 发表于 21-11-2012 10:29 AM
Google 了一下, 可能以下资料对您有用:

http://www.west-wind.com/presentations/PayPalIntegration/Pa ...

好的,非常谢谢您!那么ipay88呢?你有概念吗?之前问过ipay88公司,他们给了一个diagram,也问过coding应该怎么写,结果他们没给plug in 的code,只是encryption的code。实在头痛!再次谢谢您!
回复

使用道具 举报

发表于 21-11-2012 03:01 PM | 显示全部楼层
Ipay88 不是Free Setup的,您需要签他们的服务然后向他们拿Integration coding的。
回复

使用道具 举报

发表于 24-11-2012 09:20 PM | 显示全部楼层
回复

使用道具 举报

Follow Us
发表于 3-12-2012 12:20 PM | 显示全部楼层
你是自己built from scratch的?
你就必须联系ipay88的人帮你了。
回复

使用道具 举报

 楼主| 发表于 3-12-2012 03:26 PM | 显示全部楼层
在这里分享我撞板后得到的源码:
code:
Imports System.Security.Cryptography
Partial Class proceed
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
        Signature.Text = getSignature("dq4NtFy6u6" & MerchantCode.Text.Trim & RefNo.Text.Trim & Amount.Text.Trim.Replace(".", "" & Currency.Text.Trim)
        Dim d As Decimal = 12341234.56
        Dim s As String = d.ToString("N"
        Label1.Text = s
        Session("abc" = "this is a session"
    End Sub
    Public Function getSignature(ByVal Key As String) As String
        Dim objSHA1 As New SHA1CryptoServiceProvider()
        objSHA1.ComputeHash(System.Text.Encoding.UTF8.GetBytes(Key.ToCharArray))
        Dim buffer() As Byte = objSHA1.Hash
        Dim HashValue As String = System.Convert.ToBase64String(buffer)
        Return HashValue
    End Function

    Protected Sub HttpPostButton_Click(sender As Object, e As System.EventArgs) Handles HttpPostButton.Click

    End Sub
End Class

asp .net code:

asp .net code:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="proceed.aspx.vb" Inherits="proceed" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:TextBox ID="MerchantCode" runat="server"></asp:TextBox>
        <asp:TextBox ID="aymentId" runat="server">2</asp:TextBox>
        <asp:TextBox ID="Amount" runat="server">1.00</asp:TextBox>
        <asp:TextBox ID="Currency" runat="server">MYR</asp:TextBox>
        <asp:TextBox ID="rodDesc" runat="server">Hotel Booking</asp:TextBox>
        <asp:TextBox ID="UserName" runat="server"></asp:TextBox>
        <asp:TextBox ID="UserEmail" runat="server">a@hotmail.com</asp:TextBox>
        <asp:TextBox ID="UserContact" runat="server">0171234567</asp:TextBox>
        <asp:TextBox ID="Remark" runat="server">testing purpose</asp:TextBox>
        <asp:TextBox ID="Lang" runat="server">UTF-8</asp:TextBox>
        <asp:TextBox ID="Signature" runat="server"></asp:TextBox>
    <div>
   
        <asp:TextBox ID="RefNo" runat="server"></asp:TextBox>
   
        <asp:TextBox ID="ResponseURL" runat="server" Width="231px">www.abc123.com</asp:TextBox>
   
    </div>
    <p>
        <asp:Button ID="HttpPostButton" runat="server"
            PostBackUrl="https://www.mobile88.com/ePayment/entry.asp" Text="Use HttpPost" />   
    </p>
    <p>
        &nbsp;</p>
    <p>
        &nbsp;</p>
    <aspabel ID="Label1" runat="server"></aspabel>
    </form>
</body>
</html>
记得signature 要SHA encrypt.之后接收的方式:


Partial Class payment
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
        Label1.Text = DirectCast(Session("abc", String)
        Dim displayValues As New System.Text.StringBuilder()
        Dim postedValues As System.Collections.Specialized.NameValueCollection = Request.Form
        Dim nextKey As String
        For i As Integer = 0 To postedValues.AllKeys.Length - 1
            nextKey = postedValues.AllKeys(i)
            If nextKey.Substring(0, 2) <> "__" Then
                displayValues.Append("<br>"
                displayValues.Append(nextKey)
                displayValues.Append(" = "
                displayValues.Append(postedValues(i))
            End If
        Next i
    End Sub
End Class

现在学习写php同样的功能。
回复

使用道具 举报


ADVERTISEMENT

发表于 5-12-2012 11:06 AM | 显示全部楼层
ipay88 你需要申请一个demo account.... 我刚刚完成了。。不难
回复

使用道具 举报

发表于 6-12-2012 09:52 AM | 显示全部楼层
有问题,可以联络 support@ipay88.com.my

或找freelancer 帮你
回复

使用道具 举报

发表于 12-12-2012 01:07 PM | 显示全部楼层
联络ipay88吧,要求一个demo account就可以了
回复

使用道具 举报

发表于 4-4-2013 06:03 PM | 显示全部楼层
为什么要用ipay88?
我有其它的payment gateway
回复

使用道具 举报

发表于 27-4-2013 11:31 AM | 显示全部楼层
想做个网站,请问如何加入pay pal link?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2023 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 18-11-2025 05:16 PM , Processed in 0.288791 second(s), 28 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表