Asp.net贝宝集成测试付款 [英] Asp.net Paypal Integration Test payment

查看:138
本文介绍了Asp.net贝宝集成测试付款的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前使用asp.net与贝宝集成。我看其他教程在论坛,但它似乎老了。贝宝有这一天,这就是为什么我有一些困难的新UI。我已经注册了瓦特/ developer.paypal.com并创建沙盒帐户业务类型和个人类型的帐户。现在这里是我的code

I'm currently using asp.net to integrate with paypal. I've look to other tutorials in forums but it seems to old. Paypal has a new UI this day that's why I'm having some difficulties. I've signed up w/ developer.paypal.com and create a Business Type and Personal Type account in sandbox account. now here is my code

string Server_URL = "https://www.paypal.com/ph/cgi-bin/webscr?";

//Assigning Cmd Path as Statically to Parameter
string cmd = "_xclick";

//Assigning business Id as Statically to Parameter
string business = "Test1@gmail.com";// Enter your business account here 

//Assigning item name as Statically to Parameter
string item_name = "Item 1";

//Passing Amount as Statically to parameter 
double amount = 30000.00;

//Passing Currency as Statically to parameter
string currency_code = "PHP";

string redirect = "";

//Pass your Server_Url,cmd,business,item_name,amount,currency_code variable.        
redirect += Server_URL;
redirect += "cmd=" + cmd;
redirect += "&business=" + business;
redirect += "&first_name=" + "Name";
redirect += "&item_name=" + item_name;
redirect += "&amount=" + amount;
redirect += "&quantity=1";
redirect += "&currency_code=" + currency_code;

redirect += "&return=" + ConfigurationManager.AppSettings["SuccessURL"].ToString();
redirect += "&cancel_return=" + ConfigurationManager.AppSettings["FailedURL"].ToString();

Response.Redirect(redirect);

我把这个code的按钮,当按钮被触发此code将运行。
正如你所看到Test1@gmail.com是在我的沙箱我的企业账户。重定向后,我用我的个人账户在我的沙盒测试和购买这个项目。当我尝试登录,请检查您的电子邮件地址和密码,然后再试一次的出现,我敢肯定,我已经正确地创建我的个人帐户。
对不起,我的英语不好。

I put this code in a button so when that button was triggered this code will run. As you can see Test1@gmail.com is my Business account in my sandbox. After redirecting, I used my Personal account in my sandbox to test and buys this item. And when i try to log in, "Please check your email address and password and try again" appear and I'm sure I've created my personal account correctly. Sorry for my bad English.

推荐答案

该URL必须

string Server_URL = "https://www.sandbox.paypal.com/cgi-bin/webscr?";

如果您使用的是贝宝沙盒测试帐户,请确保您使用上面的链接。

If you are using the PayPal SandBox test Account, make sure you use the above link.

这篇关于Asp.net贝宝集成测试付款的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆