public function setDataFromTransaction($transaction)
    {
        foreach ($this->owner->config()->get('customer_map') as $type => $map) {
            switch ($type) {
                case 'int':
                    foreach ($map as $foxyField => $foxyStripeField) {
                        if ((int)$transaction->{$foxyField}) {
                            $this->owner->{$foxyStripeField} = (int)$transaction->{$foxyField};
                        }
                    }
                    break;
                case 'string':
                    foreach ($map as $foxyField => $foxyStripeField) {
                        if ((string)$transaction->{$foxyField}) {
                            $this->owner->{$foxyStripeField} = (string)$transaction->{$foxyField};
                        }
                    }
                    break;
            }
        }
        $this->owner->PasswordEncryption = 'none';

        return $this->owner;
    }
public function setDataFromTransaction($transaction)
    {
        foreach ($this->owner->config()->get('customer_map') as $type => $map) {
            switch ($type) {
                case 'int':
                    foreach ($map as $foxyField => $foxyStripeField) {
                        if ((int)$transaction->{$foxyField}) {
                            $this->owner->{$foxyStripeField} = (int)$transaction->{$foxyField};
                        }
                    }
                    break;
                case 'string':
                    foreach ($map as $foxyField => $foxyStripeField) {
                        if ((string)$transaction->{$foxyField}) {
                            $this->owner->{$foxyStripeField} = (string)$transaction->{$foxyField};
                        }
                    }
                    break;
            }
        }
        $this->owner->PasswordEncryption = 'none';

        return $this->owner;
    }
public function setDataFromTransaction ( $ transaction ) { foreach ( $ this -> owner -> config ( ) -> get ( 'customer_map' ) as $ type => $ map ) { switch ( $ type ) { case 'int' : foreach ( $ map as $ foxyField => $ foxyStripeField ) { if ( ( int ) $ transaction -> { $ foxyField } ) { $ this -> owner -> { $ foxyStripeField } = ( int ) $ transaction -> { $ foxyField } ; } } break ; case 'string' : foreach ( $ map as $ foxyField => $ foxyStripeField ) { if ( ( string ) $ transaction -> { $ foxyField } ) { $ this -> owner -> { $ foxyStripeField } = ( string ) $ transaction -> { $ foxyField } ; } } break ; } } $ this -> owner -> PasswordEncryption = 'none' ; return $ this -> owner ; }
Use the config setting for Member mapping the Foxy fields to the SilverStripe fields.

@param $transaction
Use the config setting for Member mapping the Foxy fields to the SilverStripe fields .