|
| 1 | +# Alipay AMS .net Bindings |
| 2 | + |
| 3 | + |
| 4 | +## Documentation |
| 5 | + |
| 6 | +Please see the [API docs](https://global.alipay.com/doc/ams) for the most up-to-date documentation. |
| 7 | + |
| 8 | +## Usage |
| 9 | + |
| 10 | +### Preparing |
| 11 | + |
| 12 | +You need the following Integration information before starting: |
| 13 | +``` |
| 14 | +clientId=your_client_id_here |
| 15 | +privateKey=your_private_key_here |
| 16 | +alipayPublicKey=your_public_key_here |
| 17 | +gatewayUrl=the_alipay_gateway_endpoint |
| 18 | +``` |
| 19 | + |
| 20 | +Please see the [developer docs](https://global.alipay.com/doc/ams_upm/introduction) for help with getting the above information. |
| 21 | + |
| 22 | +see `./ams-dotnet/src/example/Program.cs` for more demo usage. |
| 23 | + |
| 24 | +## Advanced Topic |
| 25 | + |
| 26 | +### Integration Best Practice |
| 27 | + |
| 28 | +Create optimal payment experiences for your customers by following these [best practices](https://global.alipay.com/doc/ams_upm/bp) for integrations. |
| 29 | + |
| 30 | +### Using API Mock |
| 31 | + |
| 32 | +We provide an API mocking tool(currently in BETA version) for you to easily test exceptional cases. |
| 33 | + |
| 34 | +Below are some of the default out-of-box mocking rules that basically use the payment amount value to identify the desired mock response: |
| 35 | + |
| 36 | +|API|when which input parameter|equals what|then you get a response of| |
| 37 | +|---|---|---|---| |
| 38 | +|ams/api/v1/payments/pay|payToAmount.value|9901|UNKNOWN_EXCEPTION| |
| 39 | +|ams/api/v1/payments/pay|payToAmount.value|9902|network timeout| |
| 40 | +|ams/api/v1/payments/inquiryPayment|payToAmount.value of the corresponding PAY request|9903|UNKNOWN_EXCEPTION| |
| 41 | +|ams/api/v1/payments/inquiryPayment|payToAmount.value of the corresponding PAY request|9904|network timeout| |
| 42 | + |
| 43 | +To use this mocking tool: |
| 44 | + |
| 45 | +1. Set gatewayUrl=https://isandbox.alipaydev.com |
| 46 | +2. Set alipayPublicKey to a fixed value that you can get from us through [email protected]. |
| 47 | + |
| 48 | +### Acceptance testing |
| 49 | + |
| 50 | +Pass all the acceptance test cases in the Alipay Developer Center to ensure a high quality integration. Especially, test exceptions by using test cases. |
| 51 | + |
| 52 | +## To get help |
| 53 | + |
| 54 | +If you have any question or feedbacks regarding this sdk, please contact us at [email protected]. |
| 55 | + |
| 56 | +For other tech integration related issues, please reach us through [email protected]. |
| 57 | + |
| 58 | + |
| 59 | +## FAQ |
| 60 | + |
| 61 | +### What if I only need to use the digital signature feature ? |
| 62 | + |
| 63 | +See [Digital signature](https://global.alipay.com/doc/ams/digital_signature) for details about the signature algorithm used for data transmission. |
| 64 | + |
| 65 | +`./ams-dotnet/src/com/alipay/ams/util/SignatureUtil.cs` provides static utility methods that you can directly use. |
| 66 | + |
| 67 | +## Change history |
| 68 | + |
| 69 | +|Date|Version|Content|Backward compatible?| |
| 70 | +|---|---|---|---| |
| 71 | +|2020/10/10|1.0|v1 release|-| |
| 72 | + |
0 commit comments