2016-06-15 22 views
1

Die API-Dokumentation sagt createProfile auf true festzulegen. Ich kann kein Beispiel dafür finden, also habe ich nach der Suche die Methode setCreateProfile gefunden. Ich benutze es so. Ich bekomme keine Fehler.Authorize.Net CIM: So senden Sie createProfile = true in die Transaktion mit PHP API

$ this-> custpaymentprofile = neu AnetAPI \ CustomerProfilePaymentType(); $ this-> custpaymentprofile-> setCreateProfile (true);

Was ich nicht herausfinden kann ist, wie diese Einstellung über die Transaktion gesendet wird, so dass ein Kundenprofil erstellt wird.

Alle anderen Daten werden gesendet durch AnetAPI \ TransactionRequestType()

IE: $ this-> transactionRequestType-> setOrder ($ this-> bestellen);

Alles andere funktioniert, kann ich eine erfolgreiche Transaktion ausführen, nur um es zum Erstellen eines Profils zu bekommen.

Antwort

1

es gefunden:

$profile = new AnetAPI\CustomerProfilePaymentType(); 
$profile->setCreateProfile(true); 
$transactionRequestType->setProfile($profile);