我是一名商人,想向访问我网站的客户收费。
我正在调用DoDirectPayment API,总是收费一次,从不重复收费。
Paypal 正确验证信用卡,当卡信息不正确时给出正确的错误消息,但当它正确时,是时候向客户收费了,它说:
由于商家配置无效,无法处理此交易。
我无法弄清楚为什么我使用 DoDirectPayment API 收到此错误消息。
一切似乎都指向一个“计费协议”。我必须在 Paypal 中配置吗?
我对另一个贝宝帐户使用相同的代码并且工作正常。好像我在 Paypal 中缺少配置。
//要求
{"DoDirectPaymentRequestDetails":{"PaymentAction":2,"PaymentDetails":{"OrderTotal":{"currencyID":125,"Value":"29.47"},"ItemTotal":null,"ShippingTotal":null,"HandlingTotal":null,"TaxTotal":null,"OrderDescription":null,"Custom":null,"InvoiceID":null,"ButtonSource":null,"NotifyURL":null,"ShipToAddress":null,"ShippingMethod":0,"ShippingMethodSpecified":false,"ProfileAddressChangeDate":"\/Date(-62135578800000)\/","ProfileAddressChangeDateSpecified":false,"PaymentDetailsItem":null,"InsuranceTotal":null,"ShippingDiscount":null,"InsuranceOptionOffered":null,"AllowedPaymentMethod":0,"AllowedPaymentMethodSpecified":false,"EnhancedPaymentData":null,"SellerDetails":null,"NoteText":null,"TransactionId":null,"PaymentAction":0,"PaymentActionSpecified":false,"PaymentRequestID":null,"OrderURL":null,"SoftDescriptor":null},"CreditCard":{"CreditCardType":1,"CreditCardTypeSpecified":false,"CreditCardNumber":"XXXXXX","ExpMonth":X,"ExpMonthSpecified":true,"ExpYear":201X,"ExpYearSpecified":true,"CardOwner":{"Payer":"","PayerID":"","PayerStatus":1,"PayerStatusSpecified":false,"PayerName":{"Salutation":null,"FirstName":"daniel","MiddleName":null,"LastName":"XXXXX","Suffix":null},"PayerCountry":37,"PayerCountrySpecified":false,"PayerBusiness":null,"Address":{"Name":null,"Street1":"XXXXX","Street2":"d","CityName":"XXXXX","StateOrProvince":"XX","Country":37,"CountrySpecified":true,"CountryName":"CA","Phone":null,"PostalCode":"XXXXX","AddressID":null,"AddressOwner":0,"AddressOwnerSpecified":false,"ExternalAddressID":null,"InternationalName":null,"InternationalStateAndCity":null,"InternationalStreet":null,"AddressStatus":0,"AddressStatusSpecified":false},"ContactPhone":null},"CVV2":"XXX","StartMonth":0,"StartMonthSpecified":false,"StartYear":0,"StartYearSpecified":false,"IssueNumber":null,"ThreeDSecureRequest":null},"IPAddress":"127.0.0.1","MerchantSessionId":"","ReturnFMFDetails":false,"ReturnFMFDetailsSpecified":false},"ReturnFMFDetails":0,"ReturnFMFDetailsSpecified":false,"DetailLevel":null,"ErrorLanguage":null,"Version":"51.0","Any":null}
//Response
{"Amount":{"currencyID":125,"Value":"29.47"},"AVSCode":null,"CVV2Code":null,"TransactionID":null,"PendingReason":0,"PendingReasonSpecified":false,"PaymentStatus":0,"PaymentStatusSpecified":false,"FMFDetails":null,"ThreeDSecureResponse":null,"Timestamp":"\/Date(1375552138000)\/","TimestampSpecified":true,"Ack":1,"CorrelationID":"12d77e0d2b686","Errors":[{"ShortMessage":"Invalid Configuration","LongMessage":"This transaction cannot be processed due to an invalid merchant configuration.","ErrorCode":"10501","SeverityCode":1,"ErrorParameters":null}],"Version":"51.0","Build":"7165512","Any":null}
Any help would be appreciated!
Thanks