cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Error While Creating the Customer Payment Profile

[code] => E00003
[text] => Name cannot begin with the '>' character, hexadecimal value 0x3E. Line 2, position 269.
)

 

Passing the following array in it :- 

 

$creditCard = new AnetAPI\CreditCardType();
$creditCard->setCardNumber("456456");
$creditCard->setExpirationDate("5566");
$creditCard->setCardCode("456");
$paymentCreditCard = new AnetAPI\PaymentType();
$paymentCreditCard->setCreditCard($creditCard);
//echo "<pre>";print_r($paymentCreditCard);exit;
// Create the Bill To info for new payment type
$phoneNumber = "123456";

$billto = new AnetAPI\CustomerAddressType();
$billto->setFirstName("Mrs Mary".$phoneNumber);
$billto->setLastName("Doe");
$billto->setCompany("My company");
$billto->setAddress("123 Main St.");
$billto->setCity("Bellevue");
$billto->setState("WA");
$billto->setZip("98004");
$billto->setPhoneNumber($phoneNumber);
$billto->setfaxNumber("999-999-9999");
$billto->setCountry("USA");
// Create a new Customer Payment Profile
$paymentprofile = new AnetAPI\CustomerPaymentProfileType();
$paymentprofile->setCustomerType('individual');
$paymentprofile->setBillTo($billto);
$paymentprofile->setPayment($paymentCreditCard);
$payment_response = $customer_profile->createCustomerPaymentProfile('40883515',$paymentprofile);

manal
Contributor
2 REPLIES 2

Hello @manal

It doesn't look like anyone has responded yet, but someone still may have feedback on what you're looking for. I'd recommend subscribing to this topic so that you'll be alerted via email if anyone else from the community is able to respond with any comments. To subscribe, click Topic Options at the top of this thread and then select Subscribe. You'll then receive an email once anyone replies to your post.

Thanks,

Richard

RichardH
Administrator Administrator
Administrator

Not positive, but that looks like an xml error.

 

Another question,

Are you using <? or <?php at the top of your file?

 

- D

fifty-git
Regular Contributor