$billto->setFirstName("Mrs Mary");
$billto->setLastName("Doe");
$billto->setAddress("1 New St.");
$billto->setCity("Brand New City");
$billto->setState("WA");
$billto->setZip("98004");
$billto->setPhoneNumber("000-000-0000");
$billto->setfaxNumber("999-999-9999");
$billto->setCountry("USA");
// Create the Customer Payment Profile object
$paymentprofile = new AnetAPI\CustomerPaymentProfileExType();
$paymentprofile->setCustomerPaymentProfileId("33211899");
$paymentprofile->setBillTo($billto);
$paymentprofile->setPayment($paymentCreditCard);
// Submit a UpdatePaymentProfileRequest
$request->setPaymentProfile($paymentprofile);
$controller = new AnetController\UpdateCustomerPaymentProfileController($request);
$response = $controller->executeWithApiResponse(\net\authorize\api\constants\ANetEnvironment::SANDBOX);
if ($response != null && $response->getMessages()->getResultCode() == "Ok") {
    echo "Update Customer Payment Profile SUCCESS: " . "\n";
    // Update only returns success or fail, if success
    // confirm the update by doing a GetCustomerPaymentProfile
    $getRequest = new AnetAPI\GetCustomerPaymentProfileRequest();
    $getRequest->setMerchantAuthentication($merchantAuthentication);
    $getRequest->setRefId($refId);
    $getRequest->setCustomerProfileId("36731856");
    $getRequest->setCustomerPaymentProfileId("33211899");
    $controller = new AnetController\GetCustomerPaymentProfileController($getRequest);
    $response = $controller->executeWithApiResponse(\net\authorize\api\constants\ANetEnvironment::SANDBOX);
    if ($response != null) {
        if ($response->getMessages()->getResultCode() == "Ok") {