【发布时间】:2015-07-05 11:04:08
【问题描述】:
我正在为我的游戏创建我的商店系统,我将使用 paypal 作为付款方式,并且我已经完成了所有逻辑,但是我需要测试调用以验证购买,我研究了并且 paypal 提供了一种方法“沙盒账户”可以在这里模拟一个虚拟的PayPal账户,现在问题是我的系统和教程中的例子有点不同,关于如何使用沙盒调用账户:Test Calls Tutorial
我正在使用它从我的游戏中将付款信息发送到贝宝:
public void DoPayment(PaypalItem _item)
{
//string itemName, string itemNumber, double price, string userName
if (!HasInfo)
{
Debug.Log("Dont have Info get");
return;
}
StringBuilder url = new StringBuilder();
string mod_price = string.Format("{0:0.00}", _item._price).ToString().Replace(",", ".");
url.Append(serverURL + "?cmd=_xclick¤cy_code=" + this.Currency.ToString() + "&business=" + this.Email);
url.Append("&amount=" + mod_price);
url.AppendFormat("&item_name={0}", _item._itemName);
url.AppendFormat("&item_number={0}", _item._itemNumber);
url.AppendFormat("&custom={0}", _item._customer);
url.AppendFormat("¬ify_url={0}", this.NotifyUrl);
if (!ReturnUrl.Equals(string.Empty))
{
url.AppendFormat("&return={0}", this.ReturnUrl);
}
else if (!CancelUrl.Equals(string.Empty))
{
url.AppendFormat("&cancel_return={0}", this.CancelUrl);
}
Application.OpenURL(url.ToString());
}
问题是我需要修改哪个部分才能调用沙盒帐户?
任何帮助将不胜感激。
【问题讨论】:
标签: c# paypal unity3d paypal-sandbox sandbox