コード例 #1
0
        public void AuthorizationNotificationTest()
        {
            var data = @"<AuthorizationNotification xmlns=""https://mws.amazonservices.com/ipn/OffAmazonPayments/2013-01-01"">
                <AuthorizationDetails>        
	            <AmazonAuthorizationId>S02-0337308-7500736-A034462</AmazonAuthorizationId>        
	            <AuthorizationReferenceId>37956691</AuthorizationReferenceId>        
	            <AuthorizationAmount>          
	            <Amount>43.45</Amount>      
	            <CurrencyCode>EUR</CurrencyCode>    
                </AuthorizationAmount>     
	            <CapturedAmount>          
	            <Amount>0.0</Amount>         
	            <CurrencyCode>EUR</CurrencyCode>     
	            </CapturedAmount>       
	            <AuthorizationFee>       
	            <Amount>0.0</Amount>      
	            <CurrencyCode>EUR</CurrencyCode>      
	            </AuthorizationFee>   
	            <IdList/>    
                <CreationTimestamp>2019-01-24T09:14:57.271Z</CreationTimestamp>  
	            <ExpirationTimestamp>2019-02-23T09:14:57.271Z</ExpirationTimestamp>    
                <AuthorizationStatus>  
	            <State>Declined</State>        
                <LastUpdateTimestamp>2019-01-24T09:14:57.271Z</LastUpdateTimestamp> 
	            <ReasonCode>TransactionTimedOut</ReasonCode>  
	            </AuthorizationStatus>  
	            <SoftDecline>false</SoftDecline>  
	            <OrderItemCategories/>
	            <CaptureNow>true</CaptureNow>     
               <SoftDescriptor>AMZ*Aduis GmbH</SoftDescriptor> 
               </AuthorizationDetails>
            </AuthorizationNotification>";

            var p = new AmazonIpnProcessor(data);
        }
コード例 #2
0
        public void RefundNotificationTest()
        {
            var data = @"<?xml version=""1.0"" encoding=""UTF-8""?>
            <RefundNotification xmlns=""https://mws.amazonservices.com/ipn/OffAmazonPayments/2013-01-01"">
              <RefundDetails>
                <AmazonRefundId>
                  S23-1234567-1234567-0000003
                </AmazonRefundId>
                <RefundReferenceId>
                  07fff0c4e05046958db7e47607e7db17
                </RefundReferenceId>
                <RefundType>SellerInitiated</RefundType>
                <RefundAmount>
                  <Amount>5.0</Amount>
                  <CurrencyCode>GBP</CurrencyCode>
                </RefundAmount>
                <FeeRefunded>
                  <Amount>0.0</Amount>
                  <CurrencyCode>GBP</CurrencyCode>
                </FeeRefunded>
                <CreationTimestamp>
                 2013-04-22T06:07:34.617Z
                </CreationTimestamp>
                <RefundStatus>
                  <State>Completed</State>
                  <LastUpdateTimestamp>
                    2013-04-22T06:09:20.178Z
                  </LastUpdateTimestamp>
                </RefundStatus>
                <SellerRefundNote>
                  Seller%20Refund%20Note
                </SellerRefundNote>
                <SoftDescriptor>
                  AMZ*softDescriptor
                </SoftDescriptor>
              </RefundDetails>
              </RefundNotification>";

            var p = new AmazonIpnProcessor(data);
        }
コード例 #3
0
        public void OrderReferenceNotificationTest()
        {
            var data = @"<?xml version=""1.0"" encoding=""UTF-8""?>
                  <OrderReferenceNotification xmlns=""https://mws.amazonservices.com/ipn/OffAmazonPayments/2013-01-01"">
                    <OrderReference>
                    <AmazonOrderReferenceId>
                      S23-1234567-1234567
                    </AmazonOrderReferenceId>
                    <OrderTotal>
                    <Amount>106.00</Amount>
                    <CurrencyCode>GBP</CurrencyCode>
                    </OrderTotal>
                    <SellerNote>4%20Pack%20of%20BBQ%20Sauce</SellerNote>
                    <SellerOrderAttributes>
                      <SellerOrderId>5678-23</SellerOrderId>
                      <StoreName>HammysBurgers.com</StoreName>
                      <CustomInformation>
                         Holiday%20Promotion
                      </CustomInformation>
                    </SellerOrderAttributes>
                    <OrderReferenceStatus>
                    <State>CLOSED</State>
                    <ReasonCode>SellerClosed</ReasonCode>
                    <LastUpdateTimestamp>
                      2013-04-01T10:49:59.532Z
                    </LastUpdateTimestamp>
                    </OrderReferenceStatus>
                    <CreationTimestamp>
                      2013-03-30T09:58:51.234Z
                    </CreationTimestamp>
                    <ExpirationTimestamp>
                      2013-04-06T09:58:51.234Z
                    </ExpirationTimestamp>
                    </OrderReference>
                    </OrderReferenceNotification>";

            var p = new AmazonIpnProcessor(data);
        }