tags:

views:

28

answers:

1
NSString *parameterString = [NSString stringWithFormat:@"USER=username"
                                 "&PWD=API Password"
                                 "&SIGNATURE=API Signature"
                                 "&METHOD=DoDirectPayment"
                                 "&CREDITCARDTYPE=%@"
                                 "&ACCT=%@"
                                 "&EXPDATE=%@"
                                 "&CVV2=123"
                                 "&AMT=%@"
                                 "&FIRSTNAME=%@"
                                 "&LASTNAME=%@"
                                 "&STREET=%@"
                                 "&CITY=%@"
                                 "&STATE=%@"
                                 "&COUNTRY=%@"
                                 "&ZIP=%@"
                                 "&COUNTRYCODE=US"
                                 "&PAYMENTACTION=sale"
                                 "&VERSION=2.3",
                                 txtCreditCardType.text,txtAccountNumber.text,txtExpireDate.text,txtTotalAmount.text,txtFirstName.text,txtLastName.text,txtStreet.text,txtCity.text,txtState.text,txtCountry.text,txtZip.text];
+1  A: 

Maybe you need to properly url encode the values? Like the space in "API Password". The text in the text fields should also probably be url encoded instead of using the raw values.

DyingCactus
i have got Errorcode 10001 and it indicates that Internal Error so what it should be.
Ankit Vyas
I assume that is a PayPal error code so check their api documentation.
DyingCactus