gpt4 book ai didi

PayPal 自适应支付 ConvertCurrency

转载 作者:太空宇宙 更新时间:2023-11-03 16:02:23 25 4
gpt4 key购买 nike

我正在尝试运行 ConvertCurrency 自适应支付,但找不到任何不使用 SDK 的示例代码,所以我正在查看来自 PayPal 的 PDF,但我仍然感到困惑。这些应该是什么格式:

baseAmountList ap:CurrencyListconvertToCurrencyList ap:货币代码列表requestEnvelope 常见:RequestEnvelope

我不知道 ap:CurrencyList 是什么意思。这不起作用:

baseAmountList=".array( '金额' => 15, '代码' => '美元' )

那么应该怎么做呢?

提前致谢。

最佳答案

它将是 XML。这是一个示例请求和响应。

<?xml version="1.0" encoding="utf-8"?>
<ConvertCurrencyRequest xmlns="http://svcs.paypal.com/types/ap">
<requestEnvelope xmlns="">
<detailLevel>ReturnAll</detailLevel>
<errorLanguage>en_US</errorLanguage>
</requestEnvelope>
<baseAmountList xmlns="">
<currency xmlns=""><code xmlns="">USD</code>
<amount xmlns="">100.00</amount>
</currency>
</baseAmountList>
<convertToCurrencyList xmlns="">
<currencyCode xmlns="">EUR</currencyCode>
<currencyCode xmlns="">AUD</currencyCode>
<currencyCode xmlns="">CAD</currencyCode>
</convertToCurrencyList>
</ConvertCurrencyRequest>

<?xml version='1.0' encoding='UTF-8'?>
<ns2:ConvertCurrencyResponse xmlns:ns2="http://svcs.paypal.com/types/ap">
<responseEnvelope>
<timestamp>2013-12-19T23:22:07.832-08:00</timestamp>
<ack>Success</ack>
<correlationId>0d0f271253d3c</correlationId>
<build>7935900</build>
</responseEnvelope>
<estimatedAmountTable>
<currencyConversionList>
<baseAmount><code>USD</code>
<amount>100.00</amount>
</baseAmount>
<currencyList>
<currency><code>EUR</code>
<amount>73.39</amount>
</currency>
<currency><code>AUD</code>
<amount>105.41</amount>
</currency>
<currency><code>CAD</code>
<amount>100.76</amount>
</currency>
</currencyList>
</currencyConversionList>
</estimatedAmountTable>
</ns2:ConvertCurrencyResponse>

关于PayPal 自适应支付 ConvertCurrency,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20691692/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com