用户没有被重定向到payfast付款后返回url

时间:2014-12-12 11:07:22

标签: redirect payment returnurl

我已经为asp.net应用程序添加了功能,以便用户可以为购买付款。我已经将我的应用程序与payfast集成在一起,因此用户在结帐页面上确认购买后会被重定向到payfast。 我遇到的问题是,一旦在payfast侧完成用户,用户就不会被重定向到成功页面。根据我的理解,重定向应该从payfast方面自动发生。然而,我的通知页面正在被点击,我可以收集有关交易的信息。

我发送以下参数:

OpMode  =Test
amount  = 100.00
cancel_url= http://xxx.co.za/Checkout-Failure.aspx
confirmation_address    =yyy@yyy.co.za
custom_int1 = 4569
custom_str1 = Payfast
email_address   xxx@xxx.co.za
email_confirmation  1
item_description    description
item_name   item name
m_payment_id    123456
merchant_id 113246546
merchant_key    1235dfg56v4
notify_url  http://xxx.co.za/Checkout-Notify.aspx
return_url= http://xxx.co.za/Checkout-Success.aspx

在我的通知页面中,我将http OK状态代码发送回payfast

    Response.Clear()
    Response.StatusCode = HttpStatusCode.OK
    Response.End()

请帮助,我不确定我做错了什么似乎都工作,除非用户没有重定向到return_url,而是将它们发送到此页面https://sandbox.payfast.co.za/。谢谢。

1 个答案:

答案 0 :(得分:1)

删除它:

Response.Clear()
Response.StatusCode = HttpStatusCode.OK
Response.End()

无需明确设置状态代码。如果通知页面没有错误,则默认响应代码为:OK - status 200

我建议您使用Fiddler并测试通知页面。

相关问题