Squareup付款网关Api错误请求400

时间:2019-07-10 08:42:57

标签: c# model-view-controller payment-gateway bad-request

  1. 这是我收到错误请求的地方

    <script type="text/javascript">
        $(function () {
            var model = @(Html.Raw(JsonConvert.SerializeObject(Model, new JsonSerializerSettings {ContractResolver = new ExcludePropertiesContractResolver()})));
            model["A1"] = '@ViewData["A1"]';
            model["A2"] = '@ViewData["A2"]';
            model["A3"] = '@ViewData["A3"]';
            var viewModel = new ABC.SelectABC(model);
            ko.applyBindings(viewModel);
        });
    </script>
    
  2. 在这行代码中我收到了错误的请求。

    public void OnPost(string nonce)
    {
        TransactionsApi transactionsApi = new TransactionsApi();
        string uuid = NewIdempotencyKey();
        Money amount = new Money(1, Money.CurrencyEnum.USD);
        ChargeRequest body = new ChargeRequest(AmountMoney: amount, IdempotencyKey: uuid, CardNonce: nonce);
    
        try
        {
    

0 个答案:

没有答案