是否可以使用PayPal支付前preSS时通过SETEX pressCheckout传递一个送货地址? [英] Is it possible to pass a shipping address via SetExpressCheckout when using PayPal Checkout Express?

查看:264
本文介绍了是否可以使用PayPal支付前preSS时通过SETEX pressCheckout传递一个送货地址?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

刚刚与贝宝API玩耍,试图实现结帐前preSS这样我就可以接受信用卡,优先考虑那些没有一个PayPal帐户,所以我设置谁连接codeR [的LandingPage] =计费;

在我的应用程序的用户将被重定向到从PayPal网站
选择付款选项菜单中,因此,他们会已经进入了他们的地址
进入我的送货形式,反正是有使用CheckoutEx preSS时,通过这个地址贝宝?
我想在下面的值白白测试,但它似乎在用户
被重定向在PayPal的信用卡信息输入页面地址字段为空。
我可以得到他们与GETEX pressCheckout输入地址,但这种跳动点
什么我试图实现的。

 公共字符串ECSetEx pressCheckout code(字符串RETURNURL,串cancelURL,串量,字符串paymentType,串货币code)
    {
        NVPCallerServices呼叫者=新NVPCallerServices();
        IAPIProfile轮廓= ProfileFactory.createSignatureAPIProfile();    //设置您的API证书,贝宝终点,API操作和版本。
    profile.APIUsername =seller_324454235454_biz_api1.isp.net.au;
    profile.APIPassword =135​​454354;
    profile.APISignature =An5ns1Kso7MWUSSDFggfdgdfGHHGDSddGnbHJgMVp-rU03jS
        profile.Environment =沙箱;
        caller.APIProfile =轮廓;        NVP codeC连接codeR =新的NVP codeC();
        EN codeR [版本] =51.0;
        EN codeR [方法] =SETEX pressCheckout    //添加请求特定的字段​​的请求。
        EN codeR [RETURNURL] = RETURNURL;
        EN codeR [CANCELURL] = cancelURL;
        EN codeR [AMT] =金额;
        EN codeR [PAYMENTACTION] = paymentType;
        EN codeR [货币code] =货币code;
    EN codeR [的LandingPage] =计费;
    EN codeR [PAYMENTREQUEST_0_SHIPTOSTREET] =3分之345Moomy圣;
    EN codeR [PAYMENTREQUEST_0_SHIPTOCITY] =Umpa Lumpa
    EN codeR [PAYMENTREQUEST_0_SHIPTONAME] =尊尼获加;
    EN codeR [PAYMENTREQUEST_0_SHIPTOSTATE] =NSW;
    EN codeR [PAYMENTREQUEST_0_SHIPTOZIP] =2673;
    EN codeR [PAYMENTREQUEST_0_SHIPTOCOUNTRY code] =AU;
    EN codeR [PAYMENTREQUEST_0_SHIPPINGAMT] =56.00;    EN codeR [NOSHIPPING] =​​0;    //执行API操作,并获得响应。
        字符串pStrrequestforNvp = EN coder.En code();
        字符串pStresponsenvp = caller.Call(pStrrequestforNvp);        NVP codeC德codeR =新的NVP codeC();
        德coder.De code(pStresponsenvp);
   字符串的响应=去codeR [ACK] ==成功?德codeR [TOKEN]:ERROR;   返回响应;
    }


解决方案

更新您的API版本。 PAYMENTREQUEST 只适用于65.3及更高版本。这就是为什么它变得现在忽略。除此之外你的要求会出现罚款。

来源:结果
连接codeR [版本] =51.0;

要:结果
连接codeR [版本] =84.0;

Just playing around with the PayPal API, trying to implement Checkout Express so I can accept credit cards, prioritizing those who don't have a paypal account hence I set encoder["LANDINGPAGE"] = "Billing";.

In my application the user will be redirected to the PayPal site from the select payment option menu, hence they would have already entered their address into my shipping form, is there anyway to pass this address to PayPal when using CheckoutExpress ? I am trying in vain testing with the values below but it seems when user gets redirected the credit card details entry page on PayPal the address fields are blank. I can get the address they enter with GetExpressCheckout, but this beats the point of what I am trying to achieve.

    public string ECSetExpressCheckoutCode(string returnURL,string cancelURL,string amount,string paymentType,string currencyCode)
    {
        NVPCallerServices caller = new NVPCallerServices();
        IAPIProfile profile = ProfileFactory.createSignatureAPIProfile();

    // Set up your API credentials, PayPal end point, API operation and version.
    profile.APIUsername = "seller_324454235454_biz_api1.isp.net.au";
    profile.APIPassword = "135454354";
    profile.APISignature = "An5ns1Kso7MWUSSDFggfdgdfGHHGDSddGnbHJgMVp-rU03jS";
        profile.Environment="sandbox";
        caller.APIProfile = profile;

        NVPCodec encoder = new NVPCodec();
        encoder["VERSION"] =  "51.0";   
        encoder["METHOD"] =  "SetExpressCheckout";

    // Add request-specific fields to the request.
        encoder["RETURNURL"] =  returnURL;
        encoder["CANCELURL"] =  cancelURL;  
        encoder["AMT"] =  amount;
        encoder["PAYMENTACTION"] =  paymentType;
        encoder["CURRENCYCODE"] =  currencyCode;
    encoder["LANDINGPAGE"] = "Billing";
    encoder["PAYMENTREQUEST_0_SHIPTOSTREET"] = "345/3 Moomy St.";
    encoder["PAYMENTREQUEST_0_SHIPTOCITY"] = "Umpa Lumpa";
    encoder["PAYMENTREQUEST_0_SHIPTONAME"] = "Johnny Walker";
    encoder["PAYMENTREQUEST_0_SHIPTOSTATE"] = "NSW";
    encoder["PAYMENTREQUEST_0_SHIPTOZIP"] = "2673";
    encoder["PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE"] = "AU";
    encoder["PAYMENTREQUEST_0_SHIPPINGAMT"] = "56.00";

    encoder["NOSHIPPING"] = "0";

    // Execute the API operation and obtain the response.
        string pStrrequestforNvp= encoder.Encode();
        string pStresponsenvp=caller.Call(pStrrequestforNvp);

        NVPCodec decoder = new NVPCodec();
        decoder.Decode(pStresponsenvp);


   string Response = decoder["ACK"] == "Success" ? decoder["TOKEN"]: "ERROR";

   return Response;
    }

解决方案

Update your API version. PAYMENTREQUEST is only available at 65.3 and higher. That's why it's getting ignored now. Other than that your request appears fine.

From:
encoder["VERSION"] = "51.0";

To:
encoder["VERSION"] = "84.0";

这篇关于是否可以使用PayPal支付前preSS时通过SETEX pressCheckout传递一个送货地址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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