我的paypal IPN监听器在重复订阅时不会验证

时间:2016-06-10 10:58:36

标签: paypal character-encoding paypal-ipn paypal-sandbox paypal-subscriptions

我现在可以使用标准购买流程进行支付,但我无法在我的IPN监听器上进行验证。我认为问题是charset。

标准流程

class RichMarkerBuilder extends Gmaps.Google.Builders.Marker #inherit from builtin builder
  #override create_marker method
  create_marker: ->
    options = _.extend @marker_options(), @rich_marker_options()
    @serviceObject = new RichMarker options #assign marker to @serviceObject

  rich_marker_options: ->
    marker = document.createElement("div")
    marker.setAttribute 'class', 'marker_container'
    marker.innerHTML = @args.title
    _.extend(@marker_options(), { content: marker })

  infobox: (boxText)->
    content: boxText
    pixelOffset: new google.maps.Size(-140, 0)
    boxStyle:
      width: "400px"

  # override method
  create_infowindow: ->
    return null unless _.isString @args.infowindow
    boxText = document.createElement("div")
    boxText.setAttribute("class", 'marker_info_box') #to customize
    boxText.innerHTML = @args.infowindow
    @infowindow = new InfoBox(@infobox(boxText))

@buildMap = (markers)->
    handler = Gmaps.build 'Google', { builders: { Marker: RichMarkerBuilder} } #dependency injection

    #then standard use
    handler.buildMap { provider: {}, internal: {id: 'map'} }, ->
      markers = handler.addMarkers(markers)
      handler.bounds.extendWith(markers)
      handler.fitMapToBounds()
在我的ipn监听器上的

变量,charset通过paypal返回了utf-8并验证了

<form id="payPalForm" name="payPalForm" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
    <input type="hidden" name="rm" value="2">
    <input type="hidden" name="return" value="http://turkishreview.dev/payment/bc1412c5e0c433837c93b2243406e74a223b92a1">
    <input type="hidden" name="notify_url" value="http://turkishreview.dev/payment/bc1412c5e0c433837c93b2243406e74a223b92a1">

    <input type="hidden" name="cmd" value="_xclick">
    <input type="hidden" name="amount" value="19.00">


    <input TYPE="hidden" name="charset" value="utf-8">
    <input type="hidden" name="business" value="facilitator@tr2w.com">
    <input type="hidden" name="currency_code" value="USD">
    <input type="hidden" name="item_number" value="digital_6">
    <input type="hidden" name="item_name"
               value="12 Months - 6 Issue (Digital)">
    <input type="submit" name="submit" id="payPalButton2" style="display: none;" value="submit"/>
</form>

重复订阅流程

[cmd] => _notify-validate
[mc_gross] => 19.00
[protection_eligibility] => Eligible
[address_status] => confirmed
[payer_id] => K6YW3FZC8PHSE
[tax] => 0.00
[address_street] => 1 Main Terrace
[payment_date] => 03:38:23 Jun 10, 2016 PDT
[payment_status] => Pending
[charset] => utf-8
[address_zip] => W12 4LQ
[first_name] => buyer
[address_country_code] => GB
[address_name] => buyer buyer
[notify_version] => 3.8
[custom] => 
[payer_status] => verified
[business] => facilitator@tr2w.com
[address_country] => United Kingdom
[address_city] => Wolverhampton
[quantity] => 1
[payer_email] => buyer@tr2w.com
[verify_sign] => *****
[txn_id] => 460748311V638183B
[payment_type] => instant
[last_name] => buyer
[address_state] => West Midlands
[receiver_email] => facilitator@tr2w.com
[receiver_id] => 6PUKL55H4XAF6
[pending_reason] => multi_currency
[txn_type] => web_accept
[item_name] => 12 Months - 6 Issue (Digital)
[mc_currency] => USD
[item_number] => digital_6
[residence_country] => GB
[test_ipn] => 1
[handling_amount] => 0.00
[transaction_subject] => 
[payment_gross] => 19.00
[shipping] => 0.00
[auth] => ******

我的ipn监听器上的变量,charset通过paypal返回了windows-1252 并且尚未经过验证

<form id="payPalForm" name="payPalForm" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
  <input type="hidden" name="rm" value="2">
  <input type="hidden" name="return" value="http://turkishreview.dev/payment/f7fc9d64140453cd728c4ffd28267901bbf403e7">
  <input type="hidden" name="notify_url" value="http://turkishreview.dev/payment/f7fc9d64140453cd728c4ffd28267901bbf403e7">


  <input type="hidden" name="paymentaction" value="sale">
  <input type="hidden" name="cmd" value="_xclick-subscriptions">
  <input type="hidden" name="bn" value="Subscribe">
  <input type="hidden" name="a3" value="19.00">
  <input type="hidden" name="p3" value="1">
  <input type="hidden" name="t3" value="Y">
  <input type="hidden" name="src" value="1">

  <input TYPE="hidden" name="charset" value="utf-8">
  <input type="hidden" name="business" value="facilitator@tr2w.com">
  <input type="hidden" name="currency_code" value="USD">
  <input type="hidden" name="item_number" value="digital_6">
  <input type="hidden" name="item_name"
         value="12 Months - 6 Issue (Digital)">
  <input type="submit" name="submit" id="payPalButton2" style="display: none;" value="submit"/>
</form>

我在沙盒和贝宝生产上设置了我的卖家帐号字符集utf-8,但发生了同样的错误 Paypal screenshot

有什么问题?任何想法?

1 个答案:

答案 0 :(得分:0)

它已经解决了。

问题只是浏览器自动返回。 Charset在后台进程中收到了utf-8。

我认为这是paypal的错误